[all-commits] [llvm/llvm-project] b840d2: [mlir][IR] Send notifications for `cloneRegionBefo...

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Feb 2 01:06:23 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b840d2968391dd610b792a65133a1edc1bcc397c
      https://github.com/llvm/llvm-project/commit/b840d2968391dd610b792a65133a1edc1bcc397c
  Author: Matthias Springer <me at m-sp.org>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M mlir/include/mlir/IR/Builders.h
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/IR/PatternMatch.cpp
    M mlir/lib/Transforms/Utils/DialectConversion.cpp
    M mlir/test/Transforms/test-legalizer-full.mlir
    M mlir/test/Transforms/test-strict-pattern-driver.mlir
    M mlir/test/lib/Dialect/Test/TestPatterns.cpp

  Log Message:
  -----------
  [mlir][IR] Send notifications for `cloneRegionBefore` (#66871)

Similar to `OpBuilder::clone`, operation/block insertion notifications
should be sent when cloning the contents of a region. E.g., this is to
ensure that the newly created operations are put on the worklist of the
greedy pattern rewriter driver.

Also move `cloneRegionBefore` from `RewriterBase` to `OpBuilder`. It
only creates new IR, so it should be part of the builder API (like
`clone(Operation &)`). The function does not have to be virtual. Now
that notifications are properly sent, the override in the dialect
conversion is no longer needed.




More information about the All-commits mailing list