[LLVMdev] Why IR portable?

Duncan Sands baldrick at free.fr
Wed Dec 22 04:50:28 PST 2010


Hi 汶翰,

> I cannot find the answer of this question.
> We all know LLVM IR is portable, but it uses ILP32 and record the target layout
> within the IR.

yup, and that's why it is portable!  The same bitcode file has the same meaning
everywhere exactly because it has this information in it.  Contrast this with C
where the same C file can mean different things on different machines because
(for example) the machines have different endianness.

Ciao, Duncan.



More information about the llvm-dev mailing list