diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-04-11 10:15:10 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-04-11 10:15:10 +0000 |
commit | 7ae90d4d2da2ce1adbb49b45b78a599e7345326c (patch) | |
tree | 810a3efb25fef1bc2f374f91980e225d0f815ea9 /llvm/lib/Transforms/IPO/Inliner.cpp | |
parent | 9d376b6578145343cff4cbf3552fe3bd3079d13d (diff) | |
download | bcm5719-llvm-7ae90d4d2da2ce1adbb49b45b78a599e7345326c.tar.gz bcm5719-llvm-7ae90d4d2da2ce1adbb49b45b78a599e7345326c.zip |
Add two statistics to help track how we are computing the inline cost.
Yea, 'NumCallerCallersAnalyzed' isn't a great name, suggestions welcome.
llvm-svn: 154492
Diffstat (limited to 'llvm/lib/Transforms/IPO/Inliner.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/Inliner.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp index 8a9d14977a7..dc9cbfb05e2 100644 --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -36,6 +36,11 @@ STATISTIC(NumCallsDeleted, "Number of call sites deleted, not inlined"); STATISTIC(NumDeleted, "Number of functions deleted because all callers found"); STATISTIC(NumMergedAllocas, "Number of allocas merged together"); +// This weirdly named statistic tracks the number of times that, when attemting +// to inline a function A into B, we analyze the callers of B in order to see +// if those would be more profitable and blocked inline steps. +STATISTIC(NumCallerCallersAnalyzed, "Number of caller-callers analyzed"); + static cl::opt<int> InlineLimit("inline-threshold", cl::Hidden, cl::init(225), cl::ZeroOrMore, cl::desc("Control the amount of inlining to perform (default = 225)")); @@ -277,6 +282,7 @@ bool Inliner::shouldInline(CallSite CS) { } InlineCost IC2 = getInlineCost(CS2); + ++NumCallerCallersAnalyzed; if (!IC2) { callerWillBeRemoved = false; continue; |