[LLVMdev] indirectbr across function boundaries
Alexander Bernauer
bernauer at inf.ethz.ch
Wed Sep 15 10:17:39 PDT 2010
Hi
according to [1] and [2] the blockaddress of any basic block can be
obtained.
But I am not sure about that fact that an indirectbr can only target at
a basic block which is within the same function as the indirectbr instruction.
[1] states:
---8<---
All possible destination blocks must be listed in the label list,
otherwise this instruction has undefined behavior. This implies that
jumps to labels defined in other functions have undefined behavior as
well.
--->8---
I don't understand this implication. And what exactly is meant by "other
functions"? Can anybody clearify this?
I just want to make sure cross-function branches are really impossible.
thanks
regards
Alex
[1] http://llvm.org/docs/LangRef.html#blockaddress
[2] http://blog.llvm.org/2010/01/address-of-label-and-indirect-branches.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100915/8cf9f78e/attachment.sig>
More information about the llvm-dev
mailing list