================
@@ -954,10 +954,23 @@ mlir::applyPatternsGreedily(Region &region,
         "greedy pattern rewriter input IR failed to verify");
 #endif // MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS
 
+#ifdef EXPENSIVE_CHECKS
+  OperationFingerPrint before(config.getScope()->getParentOp());
----------------
uenoku wrote:

Good point, yeah, I think it could be unsafe. That said, there are already 
`verify(config.getScope()->getParentOp())` and 
`assert(region.getParentOp()->..)` checks above, so I don't think this function 
expects a detached region. I'm happy to create a follow up PR for this entire 
function if that's reasonable.

https://github.com/llvm/llvm-project/pull/232576
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to