<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 19, 2016 at 1:29 PM, Xinliang David Li <span dir="ltr"><<a href="mailto:davidxl@google.com" target="_blank">davidxl@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Jul 19, 2016 at 1:26 PM, Dehao Chen <span dir="ltr"><<a href="mailto:danielcdh@gmail.com" target="_blank">danielcdh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">danielcdh added a comment.<br>
<span><br>
In <a href="https://reviews.llvm.org/D22368#488605" rel="noreferrer" target="_blank">https://reviews.llvm.org/D22368#488605</a>, @davidxl wrote:<br>
<br>
> should we have a fixed cutoff threshold, or make it adaptive to the hotness ? Or more generally, make it part of the global speedup analysis (the larger the global speedup, the larger the speedup) -- which we will soon have?<br></span></blockquote><div><br></div><div><br></div></span><div>I will let Easwaran to chime in. </div><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
<br>
<br>
</span>I agree. But for now, the PSI interface only give use boolean value for hot/cold inquiry. How about we have this fixed cutoff in first, later when global speedup analysis is ready, we use the speedup as parameter to set the threshold?<br>
<span><br>
> Another thing: PGO and autoFDO should reduce overall text size compared with O2 build, so we should also do the opposite -- if the caller has zero count (non samples with autoFDO), the threshold should be reduced.<br>
<br>
<br>
</span>Added cold callsite heuristic</blockquote><div><br></div></span><div>Can you provide some size measurement with this new change?</div></div></div></div></blockquote><div><br></div><div>I've tested the binary size with this change on internal benchmarks. Overall, AutoFDO text section size is 1% smaller than O2 because of ColdCallee Heuristic, which fulfills most of the ColdCallsite heuristic thus ColdCallsite does not change text size much. So I think it should be OK to remove the ColdCallsite heuristic.</div><div><br></div><div>If we want smaller text size, we simply need to tune down the ColdThreshold.</div><div><br></div><div>Dehao</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>David</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D22368" rel="noreferrer" target="_blank">https://reviews.llvm.org/D22368</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>
</blockquote></div><br></div></div>