<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace;font-size:small;color:#000000">Good summary.</div></div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
For instance, the important Kirichoff's circult law (aka spanning tree) optimization is not implemented. (I added the optimization to clang -fprofile-generate).<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:monospace;font-size:small;color:rgb(0,0,0)">You probably meant -fprofile-instr-generate :)</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
So in bad cases (e.g. libvpx) -fprofile-instr-generate can be 15% slower than -fprofile-arcs/-fprofile-generate.<br>
<br>
The loop optimization (instead of adding a counter N times, add N to it) cannot be enabled.<br>
The benefit is relatively small, though.<br>
<br>
The frontend cannot apply inlining or some early optimizations to greatly decrease the number of counters.<br>
<br>
Instrumenting machine basic blocks feels awkward to me.<br>
Now much semantic information is lost. The loop optimization definitely cannot be applied.<br>
Edge profiling is tricky. Edge profiling requires splitting critical edges - it is not clear how you can do this after the machine basic block layout is finalized.<br>
<br></blockquote><div><br></div><div class="gmail_default" style="font-family:monospace;font-size:small;color:rgb(0,0,0)">David</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Repository:<br>
  rG LLVM Github Monorepo<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D104060/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D104060/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D104060" rel="noreferrer" target="_blank">https://reviews.llvm.org/D104060</a><br>
<br>
</blockquote></div></div>