Update ODS variadic segments "magic" attributes to use native Properties
authorMehdi Amini <joker.eph@gmail.com>
Fri, 21 Jul 2023 05:51:35 +0000 (22:51 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Tue, 25 Jul 2023 01:16:58 +0000 (18:16 -0700)
commit9ea6b30ac20f8223fb6aeae853e5c73691850a8d
tree11a90043f9755a9891cf1dfb009da5c9972d1da8
parent4ba00844174db562d2bd8b15dab6aac605eddf57
Update ODS variadic segments "magic" attributes to use native Properties

The operand_segment_sizes and result_segment_sizes Attributes are now inlined
in the operation as native propertie. We continue to support building an
Attribute on the fly for `getAttr("operand_segment_sizes")` and setting the
property from an attribute with `setAttr("operand_segment_sizes", attr)`.

A new bytecode version is introduced to support backward compatibility and
backdeployments.

Differential Revision: https://reviews.llvm.org/D155919
21 files changed:
mlir/include/mlir/Bytecode/BytecodeImplementation.h
mlir/include/mlir/Bytecode/Encoding.h
mlir/include/mlir/IR/ODSSupport.h
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/OperationSupport.h
mlir/include/mlir/TableGen/Property.h
mlir/lib/Bytecode/Reader/BytecodeReader.cpp
mlir/lib/Bytecode/Writer/IRNumbering.cpp
mlir/lib/Bytecode/Writer/IRNumbering.h
mlir/lib/CAPI/IR/IR.cpp
mlir/lib/IR/ODSSupport.cpp
mlir/lib/TableGen/Property.cpp
mlir/test/Dialect/LLVMIR/invalid.mlir
mlir/test/IR/traits.mlir
mlir/test/lib/Dialect/Test/TestOps.td
mlir/test/python/dialects/linalg/ops.py
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
mlir/tools/mlir-tblgen/OpFormatGen.cpp
mlir/unittests/IR/AdaptorTest.cpp
mlir/unittests/IR/OpPropertiesTest.cpp