[PATCH] D78302: [mlir][ods] Add materialize derived attribute method
Jacques Pienaar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 08:21:59 PDT 2020
jpienaar created this revision.
jpienaar added a reviewer: antiagainst.
Herald added subscribers: llvm-commits, frgossen, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, shauheen, burmako, rriddle, mehdi_amini.
Herald added a reviewer: rriddle.
Herald added a project: LLVM.
Generate method to generate a DictionaryAttr with attribute values of derived
attribute. If a conversion back from the derived attribute C++ type to
Attribute is not defined, then attempting to materialize such an op's derived
attributes would result in runtime failure.
This allows to treat derived attributes and attributes of an op in more uniform manner where needed. The derived attributes are not added to the operation but returned as new attribute instead.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78302
Files:
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/Interfaces/DerivedAttributeOpInterface.td
mlir/test/lib/Dialect/Test/TestDialect.h
mlir/test/lib/Dialect/Test/TestOps.td
mlir/test/lib/Dialect/Test/TestPatterns.cpp
mlir/test/mlir-tblgen/op-attribute.td
mlir/test/mlir-tblgen/op-derived-attribute.mlir
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78302.258056.patch
Type: text/x-patch
Size: 11965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200416/d8a52ec9/attachment.bin>
More information about the llvm-commits
mailing list