[llvm] 1a55fbc - [DSE,MemorySSA] Use NumRedundantStores instead of NumNoopStores.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 00:51:44 PDT 2020


Author: Florian Hahn
Date: 2020-08-19T08:50:33+01:00
New Revision: 1a55fbceaaa2f1c9450e585577b7244eb9717b42

URL: https://github.com/llvm/llvm-project/commit/1a55fbceaaa2f1c9450e585577b7244eb9717b42
DIFF: https://github.com/llvm/llvm-project/commit/1a55fbceaaa2f1c9450e585577b7244eb9717b42.diff

LOG: [DSE,MemorySSA] Use NumRedundantStores instead of NumNoopStores.

Legacy DSE uses NumRedundantStores, while MemorySSA DSE uses
NumNoopStores. We should just use the same counter.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 921670874838..7c30292e4c30 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;
     }


        


More information about the llvm-commits mailing list