<div dir="ltr">When real profile data is available, it should be trusted more than both user annotation and static heuristics.  To tell the difference between real profile data and user annotation, function entry count data can be checked.<div><br></div><div>To solve the problem of conflict info between unreachable heuristic vs user annotation, perhaps introduce an internal option to make unreachable case more biased?</div><div><br></div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 9, 2017 at 1:42 PM, Philip Reames via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">reames added a comment.<br>
<br>
FYI: Serguei is going to file an upstream bug with a clear illustration of where loop rotations goes wrong due to the issue identified here.  Essentially, for a sufficiently long running loop, the static heuristic for unreached blocks is not strongly biased enough.  In our case, we have branch weights specified which are more strongly biased than the static heuristic result.  Using the static heuristic by itself is clearly wrong, but I do see Chandler's point about the static heuristics providing useful information.  Possibly we should be using the stronger of the two sources of information?<br>
<br>
<br>
<a href="https://reviews.llvm.org/D30631" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D30631</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>