<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 12, 2016 at 2:48 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 2016-Jan-12, at 14:06, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
><br>
><br>
><br>
> On Tue, Dec 22, 2015 at 3:45 PM, Rafael Espindola via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: rafael<br>
> Date: Tue Dec 22 17:45:49 2015<br>
> New Revision: 256302<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=256302&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=256302&view=rev</a><br>
> Log:<br>
> Disable use list order on the gold plugin.<br>
><br>
> Duncan - I thought in the end the use-list preservetion ended up as opt-in and only the LLVM dev tools (llc, opt, etc) were opting in to use-list preservation. Did I misunderstand/mis-recall how that all went? Did this case just get missed? Are there any other cases we should double check?<br>
<br>
</span>Either I or someone else must have assumed that saveBCFile() was only<br>
used when trying to reproduce problems in LTO -- i.e., a non-production<br>
workflow, where reproducibility is most important.<br>
<br>
That might even be a valid assumption, but Rafael doesn't think it's<br>
worth the extra time?<br></blockquote><div><br></div><div>Right, seems I might've just assumed since Rafael was worrying about the perf that it was for some kind of production use - but based on Mehdi's comment that's not necessarily true.<br><br>I'll leave it to you guys to hack out & I'll go back to lurking/reading the thread.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> It turns out that his is *really* slow. With this change the link of<br>
> clang with plugin-opt=emit-llvm goes from 41 to 26 seconds.<br>
<br>
</span>Rafael, are you saying the full LTO optimization pipeline only takes 26<br>
seconds on clang!?  (What am I missing?)<br>
<div class="HOEnZb"><div class="h5"><br>
> We can add an option to enable it again if needed.<br>
><br>
> Modified:<br>
>     llvm/trunk/tools/gold/gold-plugin.cpp<br>
><br>
> Modified: llvm/trunk/tools/gold/gold-plugin.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=256302&r1=256301&r2=256302&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=256302&r1=256301&r2=256302&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/tools/gold/gold-plugin.cpp (original)<br>
> +++ llvm/trunk/tools/gold/gold-plugin.cpp Tue Dec 22 17:45:49 2015<br>
> @@ -756,7 +756,7 @@ static void saveBCFile(StringRef Path, M<br>
>    raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);<br>
>    if (EC)<br>
>      message(LDPL_FATAL, "Failed to write the output file.");<br>
> -  WriteBitcodeToFile(&M, OS, /* ShouldPreserveUseListOrder */ true);<br>
> +  WriteBitcodeToFile(&M, OS, /* ShouldPreserveUseListOrder */ false);<br>
>  }<br>
><br>
>  static void codegen(std::unique_ptr<Module> M) {<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
><br>
<br>
</div></div></blockquote></div><br></div></div>