[PATCH] D13755: Pass to compute dynamic instruction count

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 00:12:25 PDT 2015


Drive by question:

Why a pass and not a utility?

(Admittedly not read the code, just the description)

Thanks!

-eric

On Wed, Oct 14, 2015 at 4:01 PM Easwaran Raman via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151015/0012503b/attachment.html>


More information about the llvm-commits mailing list