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/Analysis/InlineCost.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/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index c4599c805d6..3e3d2ab7538 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -29,9 +29,12 @@ #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; +STATISTIC(NumCallsAnalyzed, "Number of call sites analyzed"); + namespace { class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> { @@ -802,6 +805,8 @@ ConstantInt *CallAnalyzer::stripAndComputeInBoundsConstantOffsets(Value *&V) { /// is below the computed threshold, then inlining was forcibly disabled by /// some artifact of the rountine. bool CallAnalyzer::analyzeCall(CallSite CS) { + ++NumCallsAnalyzed; + // Track whether the post-inlining function would have more than one basic // block. A single basic block is often intended for inlining. Balloon the // threshold by 50% until we pass the single-BB phase. |