[all-commits] [llvm/llvm-project] 108ca7: [mlir] Support dialect-wide canonicalization patte...

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu May 27 01:35:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 108ca7a7e73ca6d5f4c17a8291d0e94cd9f740d3
      https://github.com/llvm/llvm-project/commit/108ca7a7e73ca6d5f4c17a8291d0e94cd9f740d3
  Author: Matthias Springer <springerm at google.com>
  Date:   2021-05-27 (Thu, 27 May 2021)

  Changed paths:
    M mlir/include/mlir/IR/Dialect.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/TableGen/Dialect.h
    M mlir/lib/TableGen/Dialect.cpp
    M mlir/lib/Transforms/Canonicalizer.cpp
    M mlir/test/Transforms/test-canonicalize.mlir
    M mlir/test/lib/Dialect/Test/TestDialect.cpp
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/tools/mlir-tblgen/DialectGen.cpp

  Log Message:
  -----------
  [mlir] Support dialect-wide canonicalization pattern registration

* Add `hasCanonicalizer` option to Dialect.
* Initialize canonicalizer with dialect-wide canonicalization patterns.
* Add test case to TestDialect.

Dialect-wide canonicalization patterns are useful if a canonicalization pattern does not conceptually associate with any single operation, i.e., it should not be registered as part of an operation's `getCanonicalizationPatterns` function. E.g., this is the case for canonicalization patterns that match an op interface.

Differential Revision: https://reviews.llvm.org/D103226




More information about the All-commits mailing list