Dear all, I cannot find the answer of this question. We all know LLVM IR is portable, but it uses ILP32 and record the target layout within the IR. target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64 :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" target triple = "x86_64-linux-gnu" It seems it already assigned their sizes mapping with types. How can it be portable? Isn't it been written there? If any response, I'm appreciated for that. Thank you. -- Best regards, Wen-Han (Nowar) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101222/2086848a/attachment.html>
While it is possible to generate portable IR, LLVM IR obtained from non target neutral languages (C for example) is not target neutral. So, clang and llvm-gcc generated IR are not "portable". Le 22 déc. 2010 à 13:21, 汶翰 (Wen-Han) a écrit :> Dear all, > > I cannot find the answer of this question. > We all know LLVM IR is portable, but it uses ILP32 and record the target layout within the IR. > > > target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64: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" > target triple = "x86_64-linux-gnu" > > It seems it already assigned their sizes mapping with types. > How can it be portable? Isn't it been written there? > If any response, I'm appreciated for that. > Thank you. > > -- > Best regards, > Wen-Han (Nowar) > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-- Jean-Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101222/13540c66/attachment.html>
Hi 汶翰,> I cannot find the answer of this question. > We all know LLVM IR is portable, but it uses ILP32 and record the target layout > within the IR.yup, and that's why it is portable! The same bitcode file has the same meaning everywhere exactly because it has this information in it. Contrast this with C where the same C file can mean different things on different machines because (for example) the machines have different endianness. Ciao, Duncan.
Hello> We all know LLVM IR is portable, but it uses ILP32No, it doesn't use this.> It seems it already assigned their sizes mapping with types. > How can it be portable? Isn't it been written there?Everything depends on how you generated the IR. You might find this link http://llvm.org/docs/FAQ.html#platformindependent useful. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Thanks very much for all of your answer. I was confused by definition of 'portable' by my own thinking. Now I Correct that. (ILP32 is in another project, It's my typo. Thanks) So let me make a conclusion about this. LLVM IR can be a portable language, just depending on our front-end configuration or origin language limits. Did I mistake that? Thank a lot all of you. 2010/12/22 Anton Korobeynikov <anton at korobeynikov.info>> Hello > > > We all know LLVM IR is portable, but it uses ILP32 > No, it doesn't use this. > > > It seems it already assigned their sizes mapping with types. > > How can it be portable? Isn't it been written there? > Everything depends on how you generated the IR. > You might find this link > http://llvm.org/docs/FAQ.html#platformindependent useful. > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University >-- Best regards, Wen-Han (Nowar) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101222/4bc5cd10/attachment.html>