<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 27, 2018 at 10:21 AM, Davide Italiano <span dir="ltr"><<a href="mailto:davide@freebsd.org" target="_blank">davide@freebsd.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, Mar 23, 2018 at 10:06 AM, Xinliang David Li<br>
<<a href="mailto:xinliangli@gmail.com">xinliangli@gmail.com</a>> wrote:<br>
><br>
><br>
> On Thu, Jul 20, 2017 at 1:43 PM, Davide Italiano via llvm-commits<br>
> <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
>><br>
>> Author: davide<br>
>> Date: Thu Jul 20 13:43:05 2017<br>
>> New Revision: 308668<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=308668&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=308668&view=rev</a><br>
>> Log:<br>
>> [PGO] Move the PGOInstrumentation pass to new OptRemark API.<br>
>><br>
>> This fixes PR33791.<br>
>><br>
>> Modified:<br>
>>     llvm/trunk/lib/Transforms/<wbr>Instrumentation/<wbr>PGOInstrumentation.cpp<br>
>>     llvm/trunk/test/Transforms/<wbr>PGOProfile/branch1.ll<br>
>><br>
>> Modified: llvm/trunk/lib/Transforms/<wbr>Instrumentation/<wbr>PGOInstrumentation.cpp<br>
>> URL:<br>
>> <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp?rev=308668&r1=308667&r2=308668&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/<wbr>Transforms/Instrumentation/<wbr>PGOInstrumentation.cpp?rev=<wbr>308668&r1=308667&r2=308668&<wbr>view=diff</a><br>
>><br>
>> ==============================<wbr>==============================<wbr>==================<br>
>> --- llvm/trunk/lib/Transforms/<wbr>Instrumentation/<wbr>PGOInstrumentation.cpp<br>
>> (original)<br>
>> +++ llvm/trunk/lib/Transforms/<wbr>Instrumentation/<wbr>PGOInstrumentation.cpp Thu<br>
>> Jul 20 13:43:05 2017<br>
>> @@ -59,6 +59,7 @@<br>
>>  #include "llvm/Analysis/CFG.h"<br>
>>  #include "llvm/Analysis/<wbr>IndirectCallSiteVisitor.h"<br>
>>  #include "llvm/Analysis/LoopInfo.h"<br>
>> +#include "llvm/Analysis/<wbr>OptimizationDiagnosticInfo.h"<br>
>>  #include "llvm/IR/CallSite.h"<br>
>>  #include "llvm/IR/DiagnosticInfo.h"<br>
>>  #include "llvm/IR/Dominators.h"<br>
>> @@ -1483,10 +1484,9 @@ void setProfMetadata(Module *M, Instruct<br>
>>      OS << " (total count : " << TotalCount << ")";<br>
>>      OS.flush();<br>
>>      Function *F = TI->getParent()->getParent();<br>
>> -    emitOptimizationRemarkAnalysis<wbr>(<br>
>> -        F->getContext(), "pgo-use-annot", *F, TI->getDebugLoc(),<br>
>> -        Twine(BrCondStr) +<br>
>> -            " is true with probability : " + Twine(BranchProbStr));<br>
>> +    OptimizationRemarkEmitter ORE(F);<br>
>> +    ORE.emit(OptimizationRemark(<wbr>DEBUG_TYPE, "pgo-instrumentation", TI)<br>
>> +             << BrCondStr << " is true with probability : " <<<br>
>> BranchProbStr);<br>
>>    }<br>
>>  }<br>
>><br>
><br>
><br>
> Davide, I just noticed this change.  This message is not about<br>
> transformations nor missed optimizations, so it should remain as<br>
> 'remark-analysis'. Also the pass name should not be 'pgo-instrumentation'<br>
> because it is only meaningful during profile annotation pass.  Any reason<br>
> for the underlying change?<br>
><br>
<br>
</div></div>(sorry for the late answer)<br>
This was supposed to be NFC, so, no, this wasn't intended. </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I assume we<br>
didn't have enough coverage to find out this actually broke?<br>
<br></blockquote><div><br></div><div>The test case was also modified :).  Also this option is a performance debug option (pgo related), so yes, there is no better way to catch the break (not really a break, but a change).</div><div><br></div><div>David</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks!<br>
<br>
--<br>
Davide<br>
</blockquote></div><br></div></div>