[PATCH] D13755: Pass to compute dynamic instruction count

Easwaran Raman via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 16:01:35 PDT 2015


eraman created this revision.
eraman added reviewers: chandlerc, hfinkel.
eraman added a subscriber: llvm-commits.
eraman set the repository for this revision to rL LLVM.

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). 

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. 

Repository:
  rL LLVM

http://reviews.llvm.org/D13755

Files:
  include/llvm/Analysis/BlockFrequencyInfo.h
  include/llvm/Analysis/BranchProbabilityInfo.h
  include/llvm/Analysis/DynamicInstructionCount.h
  include/llvm/Analysis/InlineCost.h
  lib/Analysis/BlockFrequencyInfo.cpp
  lib/Analysis/BranchProbabilityInfo.cpp
  lib/Analysis/CMakeLists.txt
  lib/Analysis/DynamicInstructionCount.cpp
  lib/Analysis/InlineCost.cpp
  lib/Passes/PassBuilder.cpp
  lib/Passes/PassRegistry.def
  test/Analysis/DynamicInstructionCount/basic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13755.37407.patch
Type: text/x-patch
Size: 29708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151014/dd683c8b/attachment.bin>


More information about the llvm-commits mailing list