[LLVMdev] [Clang] [lld] [llvm-link] Whole program / dead-code optimization

Nick Lewycky nicholas at mxc.ca
Thu Jul 16 23:15:37 PDT 2015


ed at modk.it wrote:
>
>     Is there a reason why LLVM's link-time optimization won't work for you?
>
>     http://llvm.org/docs/GoldPlugin.html
>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_docs_GoldPlugin.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=rF94h73bKDdWVhxOWqRXpvw5pSMgvuHQXJ__qw8n2LU&s=PR31BXeMANGrAQP2Tt9Eg5psH82vj8Oq1WmyprGhyn8&e=>
>     http://llvm.org/docs/LinkTimeOptimization.html
>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_docs_LinkTimeOptimization.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=rF94h73bKDdWVhxOWqRXpvw5pSMgvuHQXJ__qw8n2LU&s=PoqmeRXrssdG9xj6Fko_SKttwLPWqUVkxFH41dOcg4w&e=>
>
>
> Well the primary motivation to move to LLVM is licensing which is why we
> also ditched binutils since we can't package gcc for iOS due to the
> GPL.  So in the end the gold plugin wouldn't work for licensing reasons
> even if we can get it to work technically but thanks for the links I'm
> still trying to wrap my head around the problem and any info helps.

The right future is a world where lld performs llvm lto for you.

Until then, the technique in Gao's PDF is what I would recommend.

Nick



More information about the llvm-dev mailing list