[sil-code-motion] Rename statistics so they dont have CSE in the name since CodeMotion is a separate pass now.

Swift SVN r13153
This commit is contained in:
Michael Gottesman
2014-01-30 17:53:03 +00:00
parent 9c119bae56
commit 091cdb499e

View File

@@ -25,9 +25,9 @@
#include "llvm/Support/Debug.h" #include "llvm/Support/Debug.h"
#include "llvm/Support/RecyclingAllocator.h" #include "llvm/Support/RecyclingAllocator.h"
STATISTIC(NumCSESunk, "Number of instructions sunk"); STATISTIC(NumSunk, "Number of instructions sunk");
STATISTIC(NumCSEDeadStores, "Number of dead stores removed"); STATISTIC(NumDeadStores, "Number of dead stores removed");
STATISTIC(NumCSEDupLoads, "Number of dup loads removed"); STATISTIC(NumDupLoads, "Number of dup loads removed");
using namespace swift; using namespace swift;
@@ -53,7 +53,7 @@ void promoteMemoryOperationsInBlock(SILBasicBlock *BB) {
if (PrevStore && PrevStore->getDest() == SI->getDest()) { if (PrevStore && PrevStore->getDest() == SI->getDest()) {
recursivelyDeleteTriviallyDeadInstructions(PrevStore, true); recursivelyDeleteTriviallyDeadInstructions(PrevStore, true);
PrevStore = SI; PrevStore = SI;
NumCSEDeadStores++; NumDeadStores++;
continue; continue;
} }
PrevStore = SI; PrevStore = SI;
@@ -65,7 +65,7 @@ void promoteMemoryOperationsInBlock(SILBasicBlock *BB) {
if (PrevStore && PrevStore->getDest() == LI->getOperand()) { if (PrevStore && PrevStore->getDest() == LI->getOperand()) {
SILValue(LI, 0).replaceAllUsesWith(PrevStore->getSrc()); SILValue(LI, 0).replaceAllUsesWith(PrevStore->getSrc());
recursivelyDeleteTriviallyDeadInstructions(LI, true); recursivelyDeleteTriviallyDeadInstructions(LI, true);
NumCSEDupLoads++; NumDupLoads++;
continue; continue;
} }
@@ -76,7 +76,7 @@ void promoteMemoryOperationsInBlock(SILBasicBlock *BB) {
SILValue(LI, 0).replaceAllUsesWith(PrevLd); SILValue(LI, 0).replaceAllUsesWith(PrevLd);
recursivelyDeleteTriviallyDeadInstructions(LI, true); recursivelyDeleteTriviallyDeadInstructions(LI, true);
LI = 0; LI = 0;
NumCSEDupLoads++; NumDupLoads++;
break; break;
} }
} }
@@ -207,7 +207,7 @@ static void sinkCodeFromPredecessors(SILBasicBlock *BB) {
for (auto I : Dups) { for (auto I : Dups) {
I->replaceAllUsesWith(InstToSink); I->replaceAllUsesWith(InstToSink);
I->eraseFromParent(); I->eraseFromParent();
NumCSESunk++; NumSunk++;
} }
// Restart the scan. // Restart the scan.