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

Evan Cheng evan.cheng at apple.com
Wed Nov 18 11:32:39 PST 2009


On Nov 18, 2009, at 11:29 AM, Bob Wilson wrote:

> 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");

How about number of instructions as well? :-) That tells more about code size impact.

Evan

> +
> 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
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list