You may want to read this discussion:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-June/063010.html
And look at how PNaCl declares its own target.
There are a few more references here:
https://developer.chrome.com/native-client/reference/pnacl-bitcode-abi
On Tue, Dec 9, 2014 at 12:33 AM, Kuperstein, Michael M <
michael.m.kuperstein at intel.com> wrote:
> Hi Hao,
>
>
>
> You are right, the IR is not “target independent” in the strict sense.
>
>
>
> There’s a fairly old post that explains this (amongst other things) in
> detail:
>
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/043719.html
>
> x86_fp80 is just one example of this.
>
>
>
> It is kind-of-possible to restrict LLVM IR to be
> sort-of-target-independent (look up Portable Native Client and SPIR for
> details), but an arbitrary IR file generated by a front-end that had target
> X in mind is not guaranteed to work as you’d expect if you use backend Y.
>
>
>
> Michael
>
>
>
> *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at
cs.uiuc.edu] *On
> Behalf Of *Hao Wang
> *Sent:* Tuesday, December 09, 2014 09:33
> *To:* llvmdev at cs.uiuc.edu
> *Subject:* [LLVMdev] The target independence of IR
>
>
>
> Hi,
>
>
>
> Can anyone help me understand that LLVM IR has "target
independence" ?
>
>
>
> 1. When we talk about "target", we mean something like
Instruction Set
> Architecture ?
>
>
>
> 2. The front-end may generate IR code such as x86_fp80, so the IR is
> actually not fully target-independent? It contains information about the
> target, and the front-end should also be aware of this?
>
>
>
> Thank you!
>
>
>
> Hao
>
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20141209/0bac4cf2/attachment.html>