[mlir][ODS] Add support for passing properties to `custom`
authorMarkus Böck <markus.bock+llvm@nextsilicon.com>
Wed, 12 Jul 2023 11:30:08 +0000 (13:30 +0200)
committerMarkus Böck <markus.bock+llvm@nextsilicon.com>
Thu, 13 Jul 2023 07:02:55 +0000 (09:02 +0200)
commit503b3ab929983fd4ed24d156c14ce9e5625044c7
tree316c17079e4e101a89eebaf4ff7566dc99a7c4c8
parent67f7efbbbb047fbeb28159f691962b365008afa4
[mlir][ODS] Add support for passing properties to `custom`

Printing and parsing properties of ops is currently only possible through the `prop-dict` attribute. This forces a specific place that the property is printed at and is generally not very flexible.

This patch adds support for passing properties to the `custom` directive, making it possible to incorporate them with more complex syntax. This makes it possible to parse and print them without generic syntax and without the use of `prop-dict`.

Differential Revision: https://reviews.llvm.org/D155072
mlir/test/IR/properties.mlir
mlir/test/lib/Dialect/Test/TestDialect.cpp
mlir/test/lib/Dialect/Test/TestOps.td
mlir/test/mlir-tblgen/op-format-invalid.td
mlir/tools/mlir-tblgen/FormatGen.h
mlir/tools/mlir-tblgen/OpFormatGen.cpp