[LLVMdev] The target independence of IR

Kuperstein, Michael M michael.m.kuperstein at intel.com
Tue Dec 9 00:33:01 PST 2014


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141209/17c0be5b/attachment.html>


More information about the llvm-dev mailing list