[Mlir-commits] [mlir] [mlir][transform] Improve error message of tracking listener. (PR #66987)

Matthias Springer llvmlistbot at llvm.org
Thu Sep 21 01:17:00 PDT 2023


================
@@ -1396,14 +1396,13 @@ void transform::TrackingListener::notifyOperationReplaced(
   };
 
   // Helper function to check if the handle is alive.
-  auto hasAliveUser = [&]() {
-    for (Value v : opHandles) {
-      for (Operation *user : v.getUsers())
-        if (user != transformOp && !happensBefore(user, transformOp))
-          return true;
-    }
-    return false;
-  };
+  SmallVector<Operation *> aliveUsers;
----------------
matthias-springer wrote:

Yes I think the important piece of information here is that the is at least one user, i.e., the handle is not dead. It is then pretty easy to find that user when looking at the transform script.

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


More information about the Mlir-commits mailing list