<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 13, 2017 at 4:17 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><br><div class="gmail_quote"><span class=""><div dir="ltr">On Thu, Jul 13, 2017 at 2:03 PM David Li via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">davidxl added a comment.<br>
<br>
Blindly downgrade the warning into remarks can be bad -- profile mismatch problems can go undetected. People may spend more time diagnosing performance regressions due to missed warnings. Worse, we may regress in compiler without noticing.<br></blockquote></span><div><br>Any other ideas?<br><br>The diagnostic handling callbacks through to Clang aren't granular enough to demote only this warning to -Wno-error</div></div></div></blockquote><div><br></div><div>Can this be fixed?</div><div><br></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_quote"><div> (also as a warning it undermines the confidence as warnings as actionable things that Clang has helped provide users).<br></div></div></div></blockquote><div><br></div><div><br></div><div>Warnings like this are usually actionable by users or compiler developers. </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_quote"><div><br>Is there a way to determine a threshold at which the profile is so out of alignment that we should tell the user they probably shouldn't use it? That could be emitted as a warning.<br></div></div></div></blockquote><div><br></div><div><br></div><div>This can be done -- but not sure if it is worth it: currently when mismatch happens, the reader does not return the record to the client. We can change that to force return a mismatched record, and check the hotness of the function. If it is cold, tolerate it. </div><div><br></div><div>Even if we have this feature, I think it should be off by default (very important for compiler developers to make sure that cfg should exactly match when source is in sync between gen and use build).</div><div><br></div><div>David</div><div><br></div><div><br></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_quote"><div><br>- Dave<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<a href="https://reviews.llvm.org/D35384" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D35384</a><br>
<br>
<br>
<br>
</blockquote></div></div>
</blockquote></div><br></div></div>