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 | 117be03cc6cfb91d385938ed94a3cf877bd8c12a (patch) | |
tree | a425931d87d224a122b943fa1022faeb1225d176 | |
parent | a18da59d4028a2e3f5751294e5f487281649299c (diff) | |
download | external_llvm-117be03cc6cfb91d385938ed94a3cf877bd8c12a.zip external_llvm-117be03cc6cfb91d385938ed94a3cf877bd8c12a.tar.gz external_llvm-117be03cc6cfb91d385938ed94a3cf877bd8c12a.tar.bz2 |
Add a statistic to PHIElimination tracking the number of critical edges split.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125476 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/PHIElimination.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp index b940e26..f59e4f1 100644 --- a/lib/CodeGen/PHIElimination.cpp +++ b/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; + } + } } } } |