[llvm-commits] [llvm] r89225 - /llvm/trunk/lib/CodeGen/BranchFolding.cpp

Bob Wilson bob.wilson at apple.com
Wed Nov 18 11:29:37 PST 2009


Author: bwilson
Date: Wed Nov 18 13:29:37 2009
New Revision: 89225

URL: http://llvm.org/viewvc/llvm-project?rev=89225&view=rev
Log:
Add statistics for tail duplication.

Modified:
    llvm/trunk/lib/CodeGen/BranchFolding.cpp

Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=89225&r1=89224&r2=89225&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original)
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Wed Nov 18 13:29:37 2009
@@ -41,8 +41,11 @@
 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 @@
        PredBB->addSuccessor(*I);
 
     Changed = true;
+    ++NumTailDups;
   }
 
   // If TailBB was duplicated into all its predecessors except for the prior





More information about the llvm-commits mailing list