[all-commits] [llvm/llvm-project] 5b95c9: [mlir][ODS] Make `prop-dict` behave closer to `att...
Markus Böck via All-commits
all-commits at lists.llvm.org
Mon Apr 15 03:13:28 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5b95c9e0cad189cc609c31029f6bc3a89bc7b612
https://github.com/llvm/llvm-project/commit/5b95c9e0cad189cc609c31029f6bc3a89bc7b612
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2024-04-15 (Mon, 15 Apr 2024)
Changed paths:
M mlir/docs/DefiningDialects/Operations.md
M mlir/include/mlir/IR/OpDefinition.h
M mlir/test/lib/Dialect/Test/TestDialect.cpp
M mlir/test/lib/Dialect/Test/TestOps.td
M mlir/test/mlir-tblgen/op-format.mlir
M mlir/tools/mlir-tblgen/OpFormatGen.cpp
Log Message:
-----------
[mlir][ODS] Make `prop-dict` behave closer to `attr-dict` (#88659)
`attr-dict` currently prints any attribute (inherent or discardable)
that does not occur elsewhere in the assembly format. `prop-dict` on the
other hand, always prints and parses all properties (including inherent
attributes stored as properties) as part of the property dictionary,
regardless of whether the properties or attributes are used elsewhere.
(with the exception of default-valued attributes implemented recently in
https://github.com/llvm/llvm-project/pull/87970).
This PR changes the behavior of `prop-dict` to only print and parse
attributes and properties that do not occur elsewhere in the assembly
format. This is achieved by 1) adding used attributes and properties to
the elision list when printing and 2) using a custom version of
`setPropertiesFromAttr` called `setPropertiesFromParsedAttr` that is
sensitive to the assembly format and auto-generated by ODS.
The current and new behavior of `prop-dict` and `attr-dict` were also
documented.
Happens to also fix https://github.com/llvm/llvm-project/issues/88506
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list