[DSE] Remove dead argument from removePartiallyOverlappedStores (NFC).
authorFlorian Hahn <flo@fhahn.com>
Wed, 19 Aug 2020 18:32:49 +0000 (19:32 +0100)
committerFlorian Hahn <flo@fhahn.com>
Wed, 19 Aug 2020 18:33:52 +0000 (19:33 +0100)
The argument is unused and can be removed.

llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp

index 7c30292..a29b635 100644 (file)
@@ -1074,8 +1074,7 @@ static bool tryToShortenBegin(Instruction *EarlierWrite,
   return false;
 }
 
-static bool removePartiallyOverlappedStores(AliasAnalysis *AA,
-                                            const DataLayout &DL,
+static bool removePartiallyOverlappedStores(const DataLayout &DL,
                                             InstOverlapIntervalsTy &IOL) {
   bool Changed = false;
   for (auto OI : IOL) {
@@ -1388,7 +1387,7 @@ static bool eliminateDeadStores(BasicBlock &BB, AliasAnalysis *AA,
   }
 
   if (EnablePartialOverwriteTracking)
-    MadeChange |= removePartiallyOverlappedStores(AA, DL, IOL);
+    MadeChange |= removePartiallyOverlappedStores(DL, IOL);
 
   // If this block ends in a return, unwind, or unreachable, all allocas are
   // dead at its end, which means stores to them are also dead.
@@ -2310,7 +2309,7 @@ bool eliminateDeadStoresMemorySSA(Function &F, AliasAnalysis &AA,
 
   if (EnablePartialOverwriteTracking)
     for (auto &KV : State.IOLs)
-      MadeChange |= removePartiallyOverlappedStores(&AA, DL, KV.second);
+      MadeChange |= removePartiallyOverlappedStores(DL, KV.second);
 
   MadeChange |= State.eliminateDeadWritesAtEndOfFunction();
   return MadeChange;