[llvm-branch-commits] [mlir] [mlir][Transform] Remove `notifyOperationErased` workaround (PR #84134)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Mar 6 00:11:22 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Matthias Springer (matthias-springer)

<details>
<summary>Changes</summary>

D144193 (#<!-- -->66771) has been merged.

---
Full diff: https://github.com/llvm/llvm-project/pull/84134.diff


1 Files Affected:

- (modified) mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp (+5-8) 


``````````diff
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(

``````````

</details>


https://github.com/llvm/llvm-project/pull/84134


More information about the llvm-branch-commits mailing list