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

Kenia Kuo kenkillerkuo at gmail.com
Tue Sep 25 10:08:02 PDT 2012


Hi David,

Thank you for your reply.

In fact, my question originally came from the google native client.
I thought that the bitcode can be shared among the different targets as it
inherently is.
Therefore, I used the clang to generate the bitcode to prove that my
thought is right,
and I supposed that the different bitcode caused from the different
versions of libraries before.

Thanks for the above answering, I know the limitations of sharing the
bitcode now.


Best regards,
Kenia

2012/9/26 David Tweed <david.tweed at arm.com>

> 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-native-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-independent-llvm-bitcode
> ****
>
> ** **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120926/5cff628b/attachment.html>


More information about the llvm-dev mailing list