<div dir="ltr"><div>Updated the patch to remove the old maxFunctionCount check (will upload the patch once phabricator is back).</div><div><br></div><div>The performance impact is neutral for FDO on speccpu2006:</div><div><br></div><div> Benchmark Base:Reference (1) </div><div>-------------------------------------------------------</div><div>spec/2006/fp/C++/444.namd 25.44 +0.30%</div><div>spec/2006/fp/C++/447.dealII 44.98 +1.68%</div><div>spec/2006/fp/C++/450.soplex 43.35 +0.63%</div><div>spec/2006/fp/C++/453.povray 38.96 -1.26%</div><div>spec/2006/fp/C/433.milc 23.79 +0.00%</div><div>spec/2006/fp/C/470.lbm 41.47 +0.64%</div><div>spec/2006/fp/C/482.sphinx3 47.86 +0.27%</div><div>spec/2006/int/C++/471.omnetpp 22.74 -0.88%</div><div>spec/2006/int/C++/473.astar 22.69 -0.48%</div><div>spec/2006/int/C++/483.xalancbmk 37.91 -1.11%</div><div>spec/2006/int/C/400.perlbench 36.28 +0.04%</div><div>spec/2006/int/C/401.bzip2 23.44 +0.23%</div><div>spec/2006/int/C/403.gcc 34.5 +0.07%</div><div>spec/2006/int/C/429.mcf 41.36 +0.65%</div><div>spec/2006/int/C/445.gobmk 27.89 +0.00%</div><div>spec/2006/int/C/456.hmmer 16.37 +0.06%</div><div>spec/2006/int/C/458.sjeng 30.32 +0.15%</div><div>spec/2006/int/C/462.libquantum 57.29 +0.12%</div><div>spec/2006/int/C/464.h264ref 47.24 -0.19%</div><div><br></div><div>geometric mean +0.05%</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 10:08 PM, 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">davidxl added inline comments.<br>
<br>
================<br>
Comment at: lib/Analysis/<wbr>ProfileSummaryInfo.cpp:80<br>
@@ -80,1 +79,3 @@<br>
<span class="">+ (uint64_t)(0.3 * (double)Summary-><wbr>getMaxFunctionCount()) ||<br>
+ isHotCount(FunctionCount.<wbr>getValue())));<br>
}<br>
</span>----------------<br>
It is very likely that isHotCount(...) is a superset of the old predicate which means the old predicate is likely to be redundant here.<br>
<br>
================<br>
Comment at: lib/Analysis/<wbr>ProfileSummaryInfo.cpp:102<br>
@@ -101,1 +101,3 @@<br>
<span class="">+ (uint64_t)(0.01 * (double)Summary-><wbr>getMaxFunctionCount()) ||<br>
+ isColdCount(FunctionCount.<wbr>getValue())));<br>
}<br>
</span>----------------<br>
It is likely that isColdCount(..) predicate is a subset of the old predicate -- thus this change likely does not make any behavior difference. To make the new check effective, Either && should be used or remove the old predicate.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D25048" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D25048</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>