[all-commits] [llvm/llvm-project] 35622a: [mlir][ODS] Add a generated builder that takes the...
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Wed Mar 5 11:18:01 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 35622a93bb034ad5c56e3a490060648b35ba49f1
https://github.com/llvm/llvm-project/commit/35622a93bb034ad5c56e3a490060648b35ba49f1
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2025-03-05 (Wed, 05 Mar 2025)
Changed paths:
M mlir/docs/DeclarativeRewrites.md
M mlir/docs/DefiningDialects/Operations.md
M mlir/include/mlir/IR/OpDefinition.h
M mlir/include/mlir/IR/OperationSupport.h
M mlir/test/lib/Dialect/Test/TestOps.td
M mlir/test/mlir-tblgen/op-attribute.td
M mlir/test/mlir-tblgen/op-decl-and-defs.td
M mlir/test/mlir-tblgen/op-result.td
M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
M mlir/unittests/TableGen/OpBuildGen.cpp
Log Message:
-----------
[mlir][ODS] Add a generated builder that takes the Properties struct (#124713)
This commit adds builders of the form
```
static void build(..., [TypeRange resultTypes],
ValueRange operands, const Properties &properties,
ArrayRef<NamedAttribute> discardableAttributes = {},
[unsigned numRegions]);
```
to go alongside the existing
result/operands/[inherent + discardable attribute list] collective
builders.
This change is intended to support a refactor to the declarative rewrite
engine to make it populate the `Properties` struct instead of creating a
`DictionaryAttr`, thus enabling rewrite rules to handle non-`Attribute`
properties.
More generally, this means that generic code that would previously call
`getAttrs()` to blend together inherent and discardable attributes can
now use `getProperties()` and `getDiscardableAttrs()` separately, thus
removing the need to serialize everything into a temporary
`DictionaryAttr`.
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