[LLVMdev] Indirect Branch Representation

Duncan Sands baldrick at free.fr
Thu Jul 24 08:38:25 PDT 2008


Hi,

> The instruction marked in BOLD should correspond to each other but LLVM code
> does not seem to capture the logic represented in corresponding C Code. So,
> should we take care to avoid such kind of label operators in code.

I'm not sure what you mean: the LLVM IR looks perfectly correct to me.
Presumably you weren't expecting the label pointer to be encoded using
the values 1 and 2?  Since the pointer value is not valid outside of
the function in which the label lives, this encoding is perfectly valid,
though not as flexible as you might wish.

Ciao,

Duncan.



More information about the llvm-dev mailing list