<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Feb 8, 2014 at 10:50 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.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><br><div class="gmail_quote"><div class="">On Wed, Feb 5, 2014 at 12:40 PM, Manman Ren <span dir="ltr"><<a href="mailto:manman.ren@gmail.com" target="_blank">manman.ren@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: mren<br>
Date: Wed Feb  5 14:40:15 2014<br>
New Revision: 200874<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=200874&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=200874&view=rev</a><br>
Log:<br>
PGO: instrumentation based profiling sets function attributes.<br>
<br>
We collect a maximal function count among all functions in the pgo data file.<br>
For functions that are hot, we set its InlineHint attribute. For functions that<br>
are cold, we set its Cold attribute.<br>
<br>
We currently treat functions with >= 30% of the maximal function count as hot<br>
and functions with <= 1% of the maximal function count are treated as cold.<br>
These two numbers are from preliminary tuning on SPEC.<br></blockquote><div><br></div></div><div>Do you have more specific info from SPEC runs and how these heuristic choices compare to other nearby values? (why 1% instead of 2 or 0.5? why 30 instead of 20 or 40 - etc) I'd love to see the graphs just out of curiosity's sake.</div>
</div></div></div></blockquote><div><br></div><div>I only did a limited amount of tuning, no graph yet. I plan to do more tuning if nobody does that ahead of me.</div><div>Ideally we should look at the distribution of the function count, and decide which functions are hot and which are cold.</div>
<div><br></div><div>Manman</div><div><br></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> </div>
</div></div></div></blockquote><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><div class="h5">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
This commit should not affect non-PGO builds and should boost performance on<br>
instrumentation based PGO.<br>
<br>
Added:<br>
    cfe/trunk/test/CodeGen/Inputs/instr-attribute.pgodata<br>
    cfe/trunk/test/CodeGen/instr-attribute.c<br>
Modified:<br>
    cfe/trunk/lib/CodeGen/CodeGenFunction.cpp<br>
    cfe/trunk/lib/CodeGen/CodeGenPGO.cpp<br>
    cfe/trunk/lib/CodeGen/CodeGenPGO.h<br></blockquote></div></div></div></div></div></blockquote></div></div></div>