[Mlir-commits] [mlir] [mlir] Avoid rewriting unreachable blocks in the greedy driver (PR #225814)

Mehdi Amini llvmlistbot at llvm.org
Wed Sep 30 08:53:49 PDT 2026


================

----------------
joker-eph wrote:

`markBlockErased` is called from `notifyBlockErased`, which receives an existing block before destruction. `RewriterBase::eraseBlock` already dereferences that pointer before sending the notification, so a null block isn’t supported there.

`markBlockChanged` instead receives `op->getBlock()`, which can be null for a detached operation. The parent region can still be null in the erased-block case, which is why that separate check remains.

I can document these API contracts...

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


More information about the Mlir-commits mailing list