[Mlir-commits] [mlir] 2a30684 - [mlir][Transforms] Use correct listener in dialect conversion (#84861)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Mar 11 18:51:15 PDT 2024


Author: Matthias Springer
Date: 2024-03-12T10:51:11+09:00
New Revision: 2a3068455716a1a37da9155d4d96107901bba4a8

URL: https://github.com/llvm/llvm-project/commit/2a3068455716a1a37da9155d4d96107901bba4a8
DIFF: https://github.com/llvm/llvm-project/commit/2a3068455716a1a37da9155d4d96107901bba4a8.diff

LOG: [mlir][Transforms] Use correct listener in dialect conversion (#84861)

There was a typo in the dialect conversion: `RewriterBase::Listener`
should be used instead of `ForwardingListener`.

Added: 
    

Modified: 
    mlir/lib/Transforms/Utils/DialectConversion.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index cd49bd121a62e5..2ec0b964b304f6 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -1020,8 +1020,8 @@ void BlockTypeConversionRewrite::commit(RewriterBase &rewriter) {
   // Inform the listener about all IR modifications that have already taken
   // place: References to the original block have been replaced with the new
   // block.
-  if (auto *listener = dyn_cast_or_null<RewriterBase::ForwardingListener>(
-          rewriter.getListener()))
+  if (auto *listener =
+          dyn_cast_or_null<RewriterBase::Listener>(rewriter.getListener()))
     for (Operation *op : block->getUsers())
       listener->notifyOperationModified(op);
 
@@ -1123,8 +1123,8 @@ void ReplaceBlockArgRewrite::commit(RewriterBase &rewriter) {
 void ReplaceBlockArgRewrite::rollback() { rewriterImpl.mapping.erase(arg); }
 
 void ReplaceOperationRewrite::commit(RewriterBase &rewriter) {
-  auto *listener = dyn_cast_or_null<RewriterBase::ForwardingListener>(
-      rewriter.getListener());
+  auto *listener =
+      dyn_cast_or_null<RewriterBase::Listener>(rewriter.getListener());
 
   // Compute replacement values.
   SmallVector<Value> replacements =


        


More information about the Mlir-commits mailing list