[LLVMdev] Regarding ARM CodeGen

Anton Korobeynikov asl at math.spbu.ru
Tue Jul 15 09:10:22 PDT 2008


Hello,

> Infrastructure, "label" is defined as Primitive type. So, is there any way
> of using a variable of Type Label in some arithmetic operation or in
> "bitcast" instruction.
No.

> llvm-as gave me an error that: "Basic block can't be used in line 3"
> (Bitcast)
Correct, labels can be used only as arguments to branches and switches.

> Is there any other way to use label in arithmetic operations.
No.

> this to represent Program counter in LLVM, since in ARM, we can have various
> instructions which operate on PC , eg.
You should use some sort of intrinsic for this, because change of PC cannot be compatible 
with 'normal' CFG structures.

--
WBR, Anton Korobeynikov 



More information about the llvm-dev mailing list