diff options
| author | Mehdi Amini <joker.eph@gmail.com> | 2023-05-01 08:43:50 -0700 |
|---|---|---|
| committer | Mehdi Amini <joker.eph@gmail.com> | 2023-05-25 15:15:47 -0700 |
| commit | 837d1ce0dc8eec5b17255291b3462e6296cb369b (patch) | |
| tree | 02a2f1982131b75dcafc7ddb577d959f016fc629 /mlir/lib/Bytecode/BytecodeOpInterface.cpp | |
| parent | a6d09d4b1ac224ed90ee8ff6c964a2bff39421c7 (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.
Back-deployment to version prior to 4 are relying on getAttrDictionnary() which
we intend to deprecate and remove: that is putting a de-factor end-of-support
horizon for supporting deployments to version older than 4.
Differential Revision: https://reviews.llvm.org/D151065
Diffstat (limited to 'mlir/lib/Bytecode/BytecodeOpInterface.cpp')
| -rw-r--r-- | mlir/lib/Bytecode/BytecodeOpInterface.cpp | 17 |
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" |
