<div dir="ltr">Drive by question:<div><br></div><div>Why a pass and not a utility?</div><div><br></div><div>(Admittedly not read the code, just the description)</div><div><br></div><div>Thanks!</div><div><br></div><div>-eric</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 14, 2015 at 4:01 PM Easwaran Raman via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">eraman created this revision.<br>
eraman added reviewers: chandlerc, hfinkel.<br>
eraman added a subscriber: llvm-commits.<br>
eraman set the repository for this revision to rL LLVM.<br>
<br>
An analysis pass in the new PM to compute estimated dynamic instruction count of a function based on the static instruction count and block frequency info. The intention is to use this in inline cost analysis to estimate speedup due to inlining (as discussed in the RFC I sent earlier).<br>
<br>
We want the static instruction counts to be closely tied to the cost model used in inline cost analysis. I have moved the CallAnalyzer interface to the header file. When used on out-of-line function, the code in CallAnalyzer that tries to simplify instructions is mostly irrelevant. In most cases, this works fine based on the fact that the initial map of known values is empty. In some cases, I need an explicit flag to distinguish whether I'm using the analyzer during inlining or not.<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D13755" rel="noreferrer" target="_blank">http://reviews.llvm.org/D13755</a><br>
<br>
Files:<br>
  include/llvm/Analysis/BlockFrequencyInfo.h<br>
  include/llvm/Analysis/BranchProbabilityInfo.h<br>
  include/llvm/Analysis/DynamicInstructionCount.h<br>
  include/llvm/Analysis/InlineCost.h<br>
  lib/Analysis/BlockFrequencyInfo.cpp<br>
  lib/Analysis/BranchProbabilityInfo.cpp<br>
  lib/Analysis/CMakeLists.txt<br>
  lib/Analysis/DynamicInstructionCount.cpp<br>
  lib/Analysis/InlineCost.cpp<br>
  lib/Passes/PassBuilder.cpp<br>
  lib/Passes/PassRegistry.def<br>
  test/Analysis/DynamicInstructionCount/basic.ll<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>