<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">While it is possible to generate portable IR,  LLVM IR obtained from non target neutral languages (C for example) is not target neutral.<div><div><br></div><div>So, clang and llvm-gcc generated IR are not "portable".</div><div><br><div><div>Le 22 déc. 2010 à 13:21, 汶翰 (Wen-Han) a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">Dear all,<div><br></div><div>I cannot find the answer of this question.</div><div>We all know LLVM IR is portable, but it uses ILP32 and record the target layout within the IR.</div><div><span class="Apple-style-span" style="font-family: monospace; font-size: medium; white-space: pre; "><span class="llvm_keyword" style="font-weight: bold; color: blue; "><br>
</span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: medium; white-space: pre; "><span class="llvm_keyword" style="font-weight: bold; color: blue; ">target</span> datalayout = "e-p:64:64:64-<span class="llvm_type" style="font-style: oblique; color: green; ">i1</span>:8:8-<span class="llvm_type" style="font-style: oblique; color: green; ">i8</span>:8:8-<span class="llvm_type" style="font-style: oblique; color: green; ">i16</span>:16:16-<span class="llvm_type" style="font-style: oblique; color: green; ">i32</span>:32:32-<span class="llvm_type" style="font-style: oblique; color: green; ">i64</span>:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"</span></div>
<div><span class="Apple-style-span" style="font-family: Arial; font-size: medium; "><pre><span class="llvm_keyword" style="font-weight: bold; color: blue; ">target</span> triple = "x86_64-linux-gnu"
</pre><pre><span class="Apple-style-span" style="font-family: arial; white-space: normal; font-size: small; "><div><br></div><div>It seems it already assigned their sizes mapping with types.</div>
<div>How can it be portable? Isn't it been written there?</div></span></pre></span><div>If any response, I'm appreciated for that.</div><div>Thank you.</div><br>-- <br>Best regards,<br>Wen-Han (Nowar)<br>
</div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>-- Jean-Daniel</div><div><br></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></div></div></body></html>