<div dir="ltr"><div>Yes, I don't think that using a different pipeline for test binaries would be a problem.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 13, 2021 at 3:04 PM Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Since we do get a module summary even for regular LTO (with metadata added to indicate whether the LTO link should do regular or ThinLTO), I think the issue is just the divergent pass managers, which is also discussed in the thread Steven pointed to. Matthew - can you remind me of the different summary issue? <div><br></div><div>Petr, in your case where you don't care about the performance (so much) when running in a ThinLTO mode since it is just tests, presumably the different pipeline issue isn't a big deal.<br><div><br></div><div>Teresa</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 13, 2021 at 2:46 PM <<a href="mailto:Matthew.Voss@sony.com" target="_blank">Matthew.Voss@sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div>
<p class="MsoNormal">Hi Petr,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">This does sound like a good use case for our pipeline. We’ve seen good runtime performance overall, as we stated in the talk. I’ve been working on upstreaming our patches off and on for a couple months now. Our pipeline needs to be ported
to the NPM, but once that work is done, the patch is ready for review. I should be able to finish that work within the next month or two and would love to get some feedback on our approach.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Matthew<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0in 0in 0in 4pt">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> Steven Wu <<a href="mailto:stevenwu@apple.com" target="_blank">stevenwu@apple.com</a>> <br>
<b>Sent:</b> Tuesday, April 13, 2021 2:39 PM<br>
<b>To:</b> David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>><br>
<b>Cc:</b> Petr Hosek <<a href="mailto:phosek@google.com" target="_blank">phosek@google.com</a>>; Voss, Matthew <<a href="mailto:Matthew.Voss@sony.com" target="_blank">Matthew.Voss@sony.com</a>>; Teresa Johnson <<a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a>>; llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Subject:</b> Re: [llvm-dev] Supporting Regular and Thin LTO with a Single LTO Bitcode Format<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">This is a really good thread to read: <a href="https://lists.llvm.org/pipermail/llvm-dev/2018-April/122469.html" target="_blank">https://lists.llvm.org/pipermail/llvm-dev/2018-April/122469.html</a><u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">There is no fundamental technical reasons why this cannot happen but it requires lots of work to fine tuning the pipeline (yes, fullLTO and thinLTO uses different pipeline) so that it reaches a good balance of performance/build overhead
for general users.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Steven<u></u><u></u></p>
<div>
<p class="MsoNormal"><br>
<br>
<u></u><u></u></p>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<div>
<p class="MsoNormal">On Apr 13, 2021, at 2:23 PM, David Blaikie via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">+Matthew and Teresa for any context they might have<br>
<br>
High level sounds like a reasonable thing to me, for what it's worth.<br>
<br>
On Tue, Apr 13, 2021 at 2:19 PM Petr Hosek via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
<br>
<u></u><u></u></p>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<p class="MsoNormal"><br>
We're using regular LTO for our Clang toolchain build because we don't mind spending more resources to squeeze out as much performance as possible. However, when looking into our build performance, I've noticed that we only spent about 1/3 of the total build
time in building distribution components, the rest is spent on building unit tests and tools that are only used by lit tests. For the latter, we don't care about the performance, so it'd be nice to avoid doing regular LTO to speed up the build.<br>
<br>
The idea I had would be to use a single LTO bitcode format for all translation units, and then decide only at link time whether to use regular LTO for distribution components or ThinLTO for everything else.<br>
<br>
After doing some research, I found the "Supporting Regular and Thin LTO with a Single LTO Bitcode Format" talk presented by Matthew Voss at LLVM Developers’ Meeting 2019 which does exactly what I described, but it seems like this was only implemented downstream.<br>
<br>
Has there been any progress on upstreaming the implementation? Is there any way to do what I described using the in-tree LTO implementation?<br>
_______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><u></u><u></u></p>
</blockquote>
<p class="MsoNormal">_______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top:2px solid rgb(213,15,37)">Teresa Johnson |</td><td nowrap style="border-top:2px solid rgb(51,105,232)"> Software Engineer |</td><td nowrap style="border-top:2px solid rgb(0,153,57)"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top:2px solid rgb(238,178,17)"><br></td></tr></tbody></table></span></div></div></div>
</blockquote></div></div>