[LLVMdev] Indirect branch instruction
sabre at nondot.org
Sat Jan 13 13:51:04 CST 2007
On Thu, 11 Jan 2007, Eric van Riet Paap wrote:
>> The switch instruction serves the same functional role. In llvm- gcc,
>> the GCC "Address of label" and "indirect goto" extensions are compiled
>> into a switch instruction.
> I think the question is how to branch to a location of which you do not
> have a label.
I'm not sure what you mean. The compiler needs to have an accurate CFG to
be successful with dataflow analysis (i.e. not miscompile your code).
> Presumably to avoid a stack overflow when you know that
> you only want to return the result of an indirect call.
It sounds like you just want tail call elimination? Jumping to the
address of an indirect call is a great way to get a crash, except in the
most trivial cases.
More information about the LLVMdev