[Mlir-commits] [mlir] [mlir] Add erase sub-region dominate tree logic in DominanceInfoBase::invalidate method (PR #192469)

Mehdi Amini llvmlistbot at llvm.org
Mon Apr 20 01:57:13 PDT 2026


================
@@ -47,6 +47,19 @@ void DominanceInfoBase<IsPostDom>::invalidate(Region *region) {
     delete it->second.getPointer();
     dominanceInfos.erase(it);
   }
+
+  // Invalidate dominator trees of nested sub-regions.
+  if (region) {
----------------
joker-eph wrote:

I don't think this check should be needed, calling this API with a nullptr should be a mistake on the caller side IMO.

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


More information about the Mlir-commits mailing list