[llvm-dev] Getting a BasicBlock address
David Greene via llvm-dev
llvm-dev at lists.llvm.org
Wed Dec 5 07:14:17 PST 2018
Is there a defined way to get the address of a BasicBlock as a value?
According to the language reference, any use outside of indirectbr and
comparison against null is undefined. There is some wording about
targets possibly allowing use in inline assembly. Is that really the
only option? Is there anything a pass can query to see if it is allowed
for a target? I don't see anything like that in TTI.
I found this hand-wavy post:
However, that seems to go against the language rules and could break at
any time. In particular, what happens if the BasicBlock is optimized
away (merged with another block, etc.)?
More information about the llvm-dev