Skip to content

Commit

Permalink
[mlir][Transforms] Use correct listener in dialect conversion (llvm#8…
Browse files Browse the repository at this point in the history
…4861)

There was a typo in the dialect conversion: `RewriterBase::Listener`
should be used instead of `ForwardingListener`.
  • Loading branch information
matthias-springer authored Mar 12, 2024
1 parent 41658ba commit 2a30684
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mlir/lib/Transforms/Utils/DialectConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 2a30684

Please sign in to comment.