[LLVMdev] Can clang generate the same bitcode with the toolchains that have same version of libraries but different targets

David Tweed david.tweed at arm.com
Tue Sep 25 09:05:35 PDT 2012


Hi Kenia,

 

What you might be trying to end up with (rather than the question you're
directly asking J ) is a platform independent compiled representation.

(Of course you might be aiming to do something else, like a cross-platform
compile farm, in which case I have no input...)

If this is the goal, the google native client team are working on PNaCl,
which is (in addition to "safety properties") designed to be

platform independent

 

http://www.chromium.org/nativeclient/pnacl/building-and-testing-portable-nat
ive-client

 

I've not kept up with this project, but I believe that this is only achieved
by considering all the possible ABIs of the targets and

ensuring enough information is provided so that the final to-native
compilation stage can resolve everything, so it's more like "bitcode able to
accommodate

all the listed targets" rather than "bitcode that's target independent".

 

HTH,

Dave

 

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of Kenia Kuo
Sent: 25 September 2012 15:49
To: Óscar Fuentes
Cc: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] Can clang generate the same bitcode with the
toolchains that have same version of libraries but different targets

 

Hi Óscar,

Thank you for your reply.

 

It looks like the limitations are the platform's API and ABI (included the
size of variable).

So, if there are two platforms that have the same API, ABI but different
ISAs, the bitcode can be shared. Can I say that?

 

Thanks,

Kenia Kuo

 

2012/9/25 Óscar Fuentes <ofv at wanadoo.es>

Kenia Kuo <kenkillerkuo at gmail.com> writes:

[snip]


> Currently, I tried the toolchains of ARM and PowerPC that have the
> different versions of libraries, obviously the generated bitcode are
> different.
> So I wonder whether the version of library is the only reason why the
> generated bitcode are different.

http://llvm.org/docs/FAQ.html#can-i-compile-c-or-c-code-to-platform-independ
ent-llvm-bitcode

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120925/135a931e/attachment.html>


More information about the llvm-dev mailing list