The target independence of IR

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The target independence of IR

Hao Wang
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 

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: The target independence of IR

Kuperstein, Michael M

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: [hidden email] [mailto:[hidden email]] On Behalf Of Hao Wang
Sent: Tuesday, December 09, 2014 09:33
To: [hidden email]
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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: The target independence of IR

JF Bastien
You may want to read this discussion:

And look at how PNaCl declares its own target.

There are a few more references here:

On Tue, Dec 9, 2014 at 12:33 AM, Kuperstein, Michael M <[hidden email]> 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: [hidden email] [mailto:[hidden email]] On Behalf Of Hao Wang
Sent: Tuesday, December 09, 2014 09:33
To: [hidden email]
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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev