[LLVMdev] Architecture Dependency of LLVM bitcode
Christian Plessl
christian.plessl at uni-paderborn.de
Tue Sep 30 12:02:51 PDT 2008
Thanks to anyone for these helpful answers. At least to me the causes
for architecture dependencies in LLVM IR are much clearer now.
On 29.09.2008, at 23:19, Chris Lattner wrote:
>>> Is this worth a FAQ entry?
>> I would definitely appreciate such a FAQ entry.
> Patches welcome :)
>
> Many things are target independent, but the most significant is that
> LLVM allows unrestricted pointer casting. An example that allows the
> programmer to "see" the underlying endianness of the target is C code
> like this:
>
> int X = ...
> char C = *(char*)&X
I don't feel sufficiently confident with the matter to write such a
FAQ entry myself.
But wouldn't it make sense to move the notes on target independency
from the Kaleidoscope tutorial (http://llvm.org/docs/tutorial/LangImpl8.html#targetindep
) to the FAQ page? In my opinion, these explanations and the
additional endianness example you gave, explain the issues with target
dependencies quite well.
Best regards,
Christian
More information about the llvm-dev
mailing list