[llvm-branch-commits] [llvm] bcc802f - [DSE] Remove a redundant call to getLocForWriteEx()

Greg Parker via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 30 22:01:47 PST 2020


Author: Greg Parker
Date: 2020-11-30T21:12:24-08:00
New Revision: bcc802fa3624ac8cc98b8a11f5315b07fc7bffc4

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

LOG: [DSE] Remove a redundant call to getLocForWriteEx()

Differential Revision: https://reviews.llvm.org/D92263

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 330d25c4dbc8..9499e892871f 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -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; });


        


More information about the llvm-branch-commits mailing list