[llvm-branch-commits] [mlir] [mlir] Check greedy rewrite fingerprints and changed flag (PR #232576)

Hideto Ueno via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Oct 15 20:49:01 PDT 2026


================
@@ -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


More information about the llvm-branch-commits mailing list