[DSE] Remove a redundant call to getLocForWriteEx()
authorGreg Parker <gparker-github@sealiesoftware.com>
Sun, 29 Nov 2020 01:54:29 +0000 (17:54 -0800)
committerGreg Parker <gparker-github@sealiesoftware.com>
Tue, 1 Dec 2020 05:12:24 +0000 (21:12 -0800)
Differential Revision: https://reviews.llvm.org/D92263

llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp

index 330d25c..9499e89 100644 (file)
@@ -2505,7 +2505,7 @@ bool eliminateDeadStoresMemorySSA(Function &F, AliasAnalysis &AA,
       continue;
     Instruction *SI = KillingDef->getMemoryInst();
 
-    auto MaybeSILoc = State.getLocForWriteEx(SI);
+    Optional<MemoryLocation> MaybeSILoc;
     if (State.isMemTerminatorInst(SI))
       MaybeSILoc = State.getLocForTerminator(SI).map(
           [](const std::pair<MemoryLocation, bool> &P) { return P.first; });