[llvm-branch-commits] [mlir] [mlir][Transform] Remove `notifyOperationErased` workaround (PR #84134)
Matthias Springer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 7 18:07:45 PST 2024
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/84134
>From 9f25fbb0bc012e8710242af0901a6416ce57e5ba Mon Sep 17 00:00:00 2001
From: Matthias Springer <springerm at google.com>
Date: Fri, 8 Mar 2024 02:06:22 +0000
Subject: [PATCH] [mlir][Transform] Remove `notifyOperationErased` workaround
D144193 (#66771) has been merged.
---
.../Dialect/Transform/IR/TransformInterfaces.cpp | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp b/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
index 71a9d61198e3fb..fe2eea535ffdcf 100644
--- a/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
+++ b/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
@@ -1278,14 +1278,11 @@ void transform::TrackingListener::notifyMatchFailure(
}
void transform::TrackingListener::notifyOperationErased(Operation *op) {
- // TODO: Walk can be removed when D144193 has landed.
- op->walk([&](Operation *op) {
- // Remove mappings for result values.
- for (OpResult value : op->getResults())
- (void)replacePayloadValue(value, nullptr);
- // Remove mapping for op.
- (void)replacePayloadOp(op, nullptr);
- });
+ // Remove mappings for result values.
+ for (OpResult value : op->getResults())
+ (void)replacePayloadValue(value, nullptr);
+ // Remove mapping for op.
+ (void)replacePayloadOp(op, nullptr);
}
void transform::TrackingListener::notifyOperationReplaced(
More information about the llvm-branch-commits
mailing list