summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-11-18 19:29:37 +0000
committerBob Wilson <bob.wilson@apple.com>2009-11-18 19:29:37 +0000
commit8984e6ec8c5d52cfe49129c9f4d4cc395c865f7e (patch)
treefd90eeec25350ffc2e9593fdc02583e5f152ecc2 /llvm/lib/CodeGen/BranchFolding.cpp
parent63c8ef8256380fca457ee2fde534349467291c97 (diff)
downloadbcm5719-llvm-8984e6ec8c5d52cfe49129c9f4d4cc395c865f7e.tar.gz
bcm5719-llvm-8984e6ec8c5d52cfe49129c9f4d4cc395c865f7e.zip
Add statistics for tail duplication.
llvm-svn: 89225
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index 94bfb7204ba..e0a7825a26c 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -41,8 +41,11 @@ using namespace llvm;
STATISTIC(NumDeadBlocks, "Number of dead blocks removed");
STATISTIC(NumBranchOpts, "Number of branches optimized");
STATISTIC(NumTailMerge , "Number of block tails merged");
+STATISTIC(NumTailDups , "Number of tail duplicated blocks");
+
static cl::opt<cl::boolOrDefault> FlagEnableTailMerge("enable-tail-merge",
cl::init(cl::BOU_UNSET), cl::Hidden);
+
// Throttle for huge numbers of predecessors (compile speed problems)
static cl::opt<unsigned>
TailMergeThreshold("tail-merge-threshold",
@@ -1107,6 +1110,7 @@ bool BranchFolder::TailDuplicate(MachineBasicBlock *TailBB,
PredBB->addSuccessor(*I);
Changed = true;
+ ++NumTailDups;
}
// If TailBB was duplicated into all its predecessors except for the prior
OpenPOWER on IntegriCloud