<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Wenlei,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for your interest :)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 7, 2020 at 12:40 AM Wenlei He <<a href="mailto:wenlei@fb.com">wenlei@fb.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 class="gmail-m_-7195685106716760808WordSection1">
<p class="MsoNormal">Cool stuff – nice to see a late splitting pass in LLVM. <u></u>
<u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">> <span style="font-family:Arial,sans-serif;color:rgb(32,33,36)">
Full Propeller optimizations include function splitting and layout optimizations, however it requires an additional round of profiling using perf on top of the peak (FDO/CSFDO + ThinLTO) binary. In this work we experiment with applying function splitting using
 the instrumented profile in the build instead of adding an additional round of profiling.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif;color:rgb(32,33,36)"><u></u> <u></u></span></p>
<p class="MsoNormal">I’d expect propeller or BOLT to be more effective at doing this due to better post-inline profile. Of course the usability advantage of not needing a separate profile is very practical, but just wondering did you see profile quality getting
 in the way here? </p></div></div></blockquote><div><span class="gmail_default" style="font-size:small">Yes, currently the pass is quite sensitive to profile quality. For e.g, the current default is to split only blocks with zero profile count. Using a binary choice is more effective than a count based threshold.</span></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 class="gmail-m_-7195685106716760808WordSection1"><p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">> <span style="font-family:Arial,sans-serif;color:black">uses existing instrumentation based FDO or CSFDO profile information.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif;color:black">Similarly, with instrumentation FDO alone, the post-inline profile may not be accurate, so for this splitting, is it more effective when used with CSFDO? Was the evaluation result
 from FDO or CSFDO?</span></p></div></div></blockquote><div><span class="gmail_default" style="font-size:small">Yes, CSFDO profiles are more effective. The SPEC and clang bootstrap numbers are FDO based however our internal benchmarks are built with CSFDO and improvement when using CSFDO profiles > FDO profiles.</span></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 class="gmail-m_-7195685106716760808WordSection1"><p class="MsoNormal"><span style="font-family:Arial,sans-serif;color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif;color:black">Also wondering does this work with Sample FDO, and do you have numbers that you can share when used with Sample FDO?</span></p></div></div></blockquote><div><span class="gmail_default" style="font-size:small">We are still working on refining the pass for Sample FDO. The initial version up for review degrades performance when used with sample profiles. We have some further refinements planned which improves it (performance neutral) however more investigation is needed to understand the differences between sampled profiles and instrumented profiles late in codegen. We are invested in ensuring this works well for sampled profiles.</span></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 class="gmail-m_-7195685106716760808WordSection1"><p class="MsoNormal"><span style="font-family:Arial,sans-serif;color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Wenle<span class="gmail_default" style="font-size:small">i</span></p></div></div></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Regards,</div><div class="gmail_default" style="font-size:small">Snehasish</div><div><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 class="gmail-m_-7195685106716760808WordSection1"><div><div>
</div>
</div>
</div>
</div>

</blockquote></div></div>