[Mlir-commits] [mlir] [MLIR][LLVM] Support for indirectbr (PR #135092)
Tobias Gysi
llvmlistbot at llvm.org
Sun Apr 13 10:16:41 PDT 2025
https://github.com/gysit commented:
After looking that the changes I wonder if we want to keep the additional verifier since:
- We probably need some DFS to detect dead blocks reliably
- The verifier is different from the verifier in LLVM proper (which we should normally avoid, I wrote some comment why we could make an exception here)
- The verifier actually kicks in while the IR is technically still correct (maybe we should rely on the block address op verifier instead that kicks in once the IR is invalid, see may explanation below)
Would this additional verifier be helpful for your use case? Maybe clang IR actually wants / needs to produce such unreachable blocks with tags. That may be perfectly fine as long as we do not call region simplify. So this verifier may actually come into our way at some point. Instead we can maybe rely on the existing blockaddress op verifier that kicks in once bad things happened (i.e. a tag operation got deleted)?
As you wrote the only real long-term solution will probably be to hook into region simplify.
https://github.com/llvm/llvm-project/pull/135092
More information about the Mlir-commits
mailing list