[Mlir-commits] [mlir] [mlir][transform] Fix crash when consuming an op in a named sequence (PR #67437)

Matthias Springer llvmlistbot at llvm.org
Tue Sep 26 23:40:02 PDT 2023


================
@@ -1021,9 +1023,10 @@ transform::TransformState::applyTransform(TransformOpInterface transform) {
       // pre-generated error messages, so we do not need the association to
       // still be there when the invalidated handle is accessed.
       SmallVector<Value> handles;
-      (void)getHandlesForPayloadOp(op, handles);
+      (void)getHandlesForPayloadOp(op, handles, /*includeOutOfScope=*/true);
       for (Value handle : handles)
-        forgetMapping(handle, /*origOpFlatResults=*/ValueRange());
+        forgetMapping(handle, /*origOpFlatResults=*/ValueRange(),
+                      /*allowOutOfScope=*/true);
       cachedNames.erase(op);
----------------
matthias-springer wrote:

Actually, the `allowOutOfScope` is not needed for `forgetValueMapping` because there is no name caching for value mappings. I removed that part again.

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


More information about the Mlir-commits mailing list