[all-commits] [llvm/llvm-project] 63c9d2: [mlir] Add transform.foreach_match

ftynse via All-commits all-commits at lists.llvm.org
Wed Apr 12 04:01:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 63c9d2b14e8b8eb642db33ebf8740d3b90269a74
      https://github.com/llvm/llvm-project/commit/63c9d2b14e8b8eb642db33ebf8740d3b90269a74
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2023-04-12 (Wed, 12 Apr 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Transform/IR/CMakeLists.txt
    A mlir/include/mlir/Dialect/Transform/IR/MatchInterfaces.h
    A mlir/include/mlir/Dialect/Transform/IR/MatchInterfaces.td
    M mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
    M mlir/include/mlir/Dialect/Transform/IR/TransformOps.h
    M mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
    M mlir/lib/Dialect/Transform/IR/CMakeLists.txt
    A mlir/lib/Dialect/Transform/IR/MatchInterfaces.cpp
    M mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
    M mlir/lib/Dialect/Transform/IR/TransformOps.cpp
    M mlir/test/Dialect/Transform/ops-invalid.mlir
    M mlir/test/Dialect/Transform/test-interpreter.mlir
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.h
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir] Add transform.foreach_match

Add a new transform op combinator that implements an "if-then-else"
style of mechanism for applying transformations. Its main purpose is to
serve as a higher-level driver when applying multiple transform scripts
to potentially overlapping pieces of the payload IR. This is similar to
how the various rewrite drivers operate in C++, but at a higher level
and with more declarative expressions. This is not intended to replace
existing pattern-based rewrites, but to to drive more complex
transformations that are exposed in the transform dialect and are too
complex to be expressed as simple declarative rewrites.

Reviewed By: springerm

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




More information about the All-commits mailing list