[llvm] [CGP] Do not eliminate blocks which have their address taken (PR #163962)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 01:52:43 PDT 2025


tetzank wrote:

> blockaddress constants are specifically designed to be used as inputs to indirectbr. Any other use of a blockaddress constant is outside of the IR model. In particular, if a block has no indirectbr predecessors, we provide no guarantees at all about the value of a blockaddress. So... in cases like #161164, yes, it just needs to point somewhere.

Ok, makes sense. All indirectbr instructions got eliminated in #161164, therefore the value of blockaddress is unimportant. One can see if a block is targeted by a indirectbr by looking at the terminator in each predecessor.

Thank you for explaining.

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


More information about the llvm-commits mailing list