[llvm-dev] Getting a BasicBlock address (original) (raw)
David Greene via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 5 07:14:17 PST 2018
- Previous message: [llvm-dev] Passing arguments and returning value of struct or class
- Next message: [llvm-dev] Getting a BasicBlock address
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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:
http://lists.llvm.org/pipermail/llvm-dev/2014-March/071542.html
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.)?
Thanks!
-David
- Previous message: [llvm-dev] Passing arguments and returning value of struct or class
- Next message: [llvm-dev] Getting a BasicBlock address
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]