summaryrefslogtreecommitdiff
path: root/mlir/lib/Bytecode/BytecodeOpInterface.cpp
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2023-05-25 21:04:35 -0700
committerMehdi Amini <joker.eph@gmail.com>2023-05-26 17:45:01 -0700
commit660f714e26999d266232a1fbb02712bb879bd34e (patch)
treea3a473f8ac64651140d855c2d6521cada262fd65 /mlir/lib/Bytecode/BytecodeOpInterface.cpp
parentf354e971b09c244147ff59eb65b34487755598c0 (diff)
[MLIR] Add native Bytecode support for properties
This is adding a new interface (`BytecodeOpInterface`) to allow operations to opt-in skipping conversion to attribute and serializing properties to native bytecode. The scheme relies on a new section where properties are stored in sequence { size, serialize_properties }, ... The operations are storing the index of a properties, a table of offset is built when loading the properties section the first time. This is a re-commit of 837d1ce0dc which conflicted with another patch upgrading the bytecode and the collision wasn't properly resolved before. Differential Revision: https://reviews.llvm.org/D151065
Diffstat (limited to 'mlir/lib/Bytecode/BytecodeOpInterface.cpp')
-rw-r--r--mlir/lib/Bytecode/BytecodeOpInterface.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/mlir/lib/Bytecode/BytecodeOpInterface.cpp b/mlir/lib/Bytecode/BytecodeOpInterface.cpp
new file mode 100644
index 000000000000..e767f57b9bb4
--- /dev/null
+++ b/mlir/lib/Bytecode/BytecodeOpInterface.cpp
@@ -0,0 +1,17 @@
+//===- BytecodeOpInterface.cpp - Bytecode Op Interfaces -------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Bytecode/BytecodeOpInterface.h"
+
+using namespace mlir;
+
+//===----------------------------------------------------------------------===//
+// BytecodeOpInterface
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Bytecode/BytecodeOpInterface.cpp.inc"