From 1a55fbceaaa2f1c9450e585577b7244eb9717b42 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 19 Aug 2020 08:47:03 +0100 Subject: [PATCH] [DSE,MemorySSA] Use NumRedundantStores instead of NumNoopStores. Legacy DSE uses NumRedundantStores, while MemorySSA DSE uses NumNoopStores. We should just use the same counter. --- llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index 9216708..7c30292 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -84,7 +84,6 @@ STATISTIC(NumFastStores, "Number of stores deleted"); STATISTIC(NumFastOther, "Number of other instrs removed"); STATISTIC(NumCompletePartials, "Number of stores dead by later partials"); STATISTIC(NumModifiedStores, "Number of stores modified"); -STATISTIC(NumNoopStores, "Number of noop stores deleted"); STATISTIC(NumCFGChecks, "Number of stores modified"); STATISTIC(NumCFGTries, "Number of stores modified"); STATISTIC(NumCFGSuccess, "Number of stores modified"); @@ -2158,7 +2157,7 @@ bool eliminateDeadStoresMemorySSA(Function &F, AliasAnalysis &AA, if (isRemovable(SI) && State.storeIsNoop(KillingDef, SILoc, SILocUnd)) { LLVM_DEBUG(dbgs() << "DSE: Remove No-Op Store:\n DEAD: " << *SI << '\n'); State.deleteDeadInstruction(SI); - NumNoopStores++; + NumRedundantStores++; MadeChange = true; continue; } -- 2.7.4