diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-02-14 02:09:11 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-02-14 02:09:11 +0000 |
commit | 8790396e6a3d66a769fe12097fe74b6430346854 (patch) | |
tree | 2c4d838c20b865309289416f27d15c168dd0eb1e /llvm/lib/CodeGen/PHIElimination.cpp | |
parent | 7ce13fc940deb8324278cbc7dd76d33235149492 (diff) | |
download | bcm5719-llvm-8790396e6a3d66a769fe12097fe74b6430346854.tar.gz bcm5719-llvm-8790396e6a3d66a769fe12097fe74b6430346854.zip |
Add a statistic to PHIElimination tracking the number of critical edges split.
llvm-svn: 125476
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index b940e269112..f59e4f1aa3b 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/lib/CodeGen/PHIElimination.cpp @@ -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; + } + } } } } |