Add a statistic to PHIElimination tracking the number of critical edges split.

llvm-svn: 125476
This commit is contained in:
Cameron Zwarich 2011-02-14 02:09:11 +00:00
parent 7ce13fc940
commit 8790396e6a
1 changed files with 7 additions and 2 deletions

View File

@ -83,6 +83,7 @@ namespace {
}
STATISTIC(NumAtomic, "Number of atomic phis lowered");
STATISTIC(NumCriticalEdgesSplit, "Number of critical edges split");
STATISTIC(NumReused, "Number of reused lowered phis");
char PHIElimination::ID = 0;
@ -413,8 +414,12 @@ bool PHIElimination::SplitPHIEdges(MachineFunction &MF,
!LV.isLiveIn(Reg, MBB) && LV.isLiveOut(Reg, *PreMBB)) {
if (!MLI ||
!(MLI->getLoopFor(PreMBB) == MLI->getLoopFor(&MBB) &&
MLI->isLoopHeader(&MBB)))
Changed |= PreMBB->SplitCriticalEdge(&MBB, this) != 0;
MLI->isLoopHeader(&MBB))) {
if (PreMBB->SplitCriticalEdge(&MBB, this)) {
Changed = true;
++NumCriticalEdgesSplit;
}
}
}
}
}