<div dir="ltr">This use case is probably dominated by code generation time, so all the expensive work is in LLVM, not LLD. When you link bitcode, the linker does all the codegen work (isel & regalloc), and it is not naturally parallelized by traditional build systems. Speeding up LLVM codegen is a long term hard problem.<div><br></div><div>In theory, LLD uses ThinLTO by default, so code generation should be parallelized to the number of cores you have on your system.</div><div><br></div><div>You can also investigate using the LTO cache to make links more incremental, so that when you change a single object file, the object files code generated for previous builds are cached.</div><div><br></div><div>Generally speaking, though, if you want fast links, I'd recommend against linking with bitcode. The entire LTO pipeline is set up for optimization, not incremental link performance.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 29, 2018 at 6:06 AM Carlo Kok via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>





<div><table><tbody><tr class="m_4625005460760792499bufferline"></tr></tbody></table><div>I've got a customer project that emits a 18 MB .exe and 9 MB .exe.pdb; It takes about 6 minutes to link on their system, 2 minutes to link on mine (this a regullar lld -flavor linkĀ  /opt:lldlto=0). the input is about 61mb of bitcode files (originally about 2100 object files) with debug info (both pdb and dwarf get emitted) stored in 5 .lib files, compiled with -O0 but with thin-lto (without thin-lto it wasn't faster).<br></div>
<div><br></div>
<div>Is this something to be expected? <br></div>
<div><br></div>
<div>Can I do something to improve the speed? <br></div>
<div><br></div>
<div>Thanks,<br></div>
<div><br></div>
<div>Carlo Kok<br></div>
</div>

_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>