mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Add statistics for tail duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89225 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -41,8 +41,11 @@ using namespace llvm;
|
|||||||
STATISTIC(NumDeadBlocks, "Number of dead blocks removed");
|
STATISTIC(NumDeadBlocks, "Number of dead blocks removed");
|
||||||
STATISTIC(NumBranchOpts, "Number of branches optimized");
|
STATISTIC(NumBranchOpts, "Number of branches optimized");
|
||||||
STATISTIC(NumTailMerge , "Number of block tails merged");
|
STATISTIC(NumTailMerge , "Number of block tails merged");
|
||||||
|
STATISTIC(NumTailDups , "Number of tail duplicated blocks");
|
||||||
|
|
||||||
static cl::opt<cl::boolOrDefault> FlagEnableTailMerge("enable-tail-merge",
|
static cl::opt<cl::boolOrDefault> FlagEnableTailMerge("enable-tail-merge",
|
||||||
cl::init(cl::BOU_UNSET), cl::Hidden);
|
cl::init(cl::BOU_UNSET), cl::Hidden);
|
||||||
|
|
||||||
// Throttle for huge numbers of predecessors (compile speed problems)
|
// Throttle for huge numbers of predecessors (compile speed problems)
|
||||||
static cl::opt<unsigned>
|
static cl::opt<unsigned>
|
||||||
TailMergeThreshold("tail-merge-threshold",
|
TailMergeThreshold("tail-merge-threshold",
|
||||||
@ -1107,6 +1110,7 @@ bool BranchFolder::TailDuplicate(MachineBasicBlock *TailBB,
|
|||||||
PredBB->addSuccessor(*I);
|
PredBB->addSuccessor(*I);
|
||||||
|
|
||||||
Changed = true;
|
Changed = true;
|
||||||
|
++NumTailDups;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If TailBB was duplicated into all its predecessors except for the prior
|
// If TailBB was duplicated into all its predecessors except for the prior
|
||||||
|
Reference in New Issue
Block a user