<div dir="auto">Sjoerd,<div dir="auto"><br></div><div dir="auto">I emailed llvm-dev a while ago suggesting that we at least turn on LTO. I really didn't get much feedback on that unfortunately, I think most people get clang via their distro or compile it themselves.</div><div dir="auto"><br></div><div dir="auto">I did look into what's needed: the release script need to build the first and second stage as it does now but for the final stage we would need to adapt it to send in a compatible linker (gold or lld) and fix ranlib/ar invocations. </div><div dir="auto"><br></div><div dir="auto">I think the most complicated part is that the release testers are the one responsible for building the final binaries and there is a lot of different systems that might require some tweaking.</div><div dir="auto"><br></div><div dir="auto">I have had a dream of some CI service being able to build PGO/LTO optimized binaries (at least for Linux, windows and Mac) for each release - but I think we would need a cloud vendor sponsoring that CPU time (as a reference our toolchain build takes ~5 hrs for something similar).</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Tobias</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 7, 2020, 14:50 Sjoerd Meijer 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">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
A compiler built with LTO / PGO can significantly improve build times. Locally I see ~10% reduction in compilation times of Debug or Release versions of clang/llvm using an LTO'd clang compiler. This is not really news of course (e.g. recently also reconfirmed
in <a href="https://linuxplumbersconf.org/event/7/contributions/802/" id="m_-8627283007291592925LPlnk" target="_blank" rel="noreferrer">
https://linuxplumbersconf.org/event/7/contributions/802/</a>), but that made me curious if we can and/or should enable LTO and/or PGO to create our prebuilt binaries?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The disadvantage for our release people will be obvious: that will take a lot more time and resources. But would it be worth to make this investment?
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Cheers,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Sjoerd.<br>
</div>
<div></div>
<br>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>