[all-commits] [llvm/llvm-project] e7ae98: [mlir][ODS] Add a collective builder that takes th...

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Tue Feb 11 23:00:29 PST 2025


  Branch: refs/heads/users/krzysz00/collective-prop-builder
  Home:   https://github.com/llvm/llvm-project
  Commit: e7ae9837e983d62c4b6bff04e3b193915c80d8af
      https://github.com/llvm/llvm-project/commit/e7ae9837e983d62c4b6bff04e3b193915c80d8af
  Author: Krzysztof Drewniak <krzysdrewniak at gmail.com>
  Date:   2025-02-11 (Tue, 11 Feb 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

  Log Message:
  -----------
  [mlir][ODS] Add a collective builder that takes the Properties struct

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`.


  Commit: 058b5ec37eb6e5f43142ae1dcf22612a025b21c0
      https://github.com/llvm/llvm-project/commit/058b5ec37eb6e5f43142ae1dcf22612a025b21c0
  Author: Krzysztof Drewniak <krzysdrewniak at gmail.com>
  Date:   2025-02-11 (Tue, 11 Feb 2025)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  Clang-format


  Commit: 4e5cfedb79eed66bf6001f883112841617e294ec
      https://github.com/llvm/llvm-project/commit/4e5cfedb79eed66bf6001f883112841617e294ec
  Author: Krzysztof Drewniak <krzysdrewniak at gmail.com>
  Date:   2025-02-11 (Tue, 11 Feb 2025)

  Changed paths:
    M mlir/unittests/TableGen/OpBuildGen.cpp

  Log Message:
  -----------
  Right, there was supposed to be a unit test here


Compare: https://github.com/llvm/llvm-project/compare/a65fe2d03943...4e5cfedb79ee

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