[PATCH] D92263: [DSE] Remove a redundant call to getLocForWriteEx()
Greg Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 28 03:56:18 PST 2020
gparker42 created this revision.
gparker42 added reviewers: asbirlea, fhahn.
gparker42 added a project: LLVM.
Herald added subscribers: llvm-commits, george.burgess.iv, hiraditya.
gparker42 requested review of this revision.
eliminateDeadStoresMemorySSA() makes two identical calls to getLocForWriteEx(). Remove one of them.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92263
Files:
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Index: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -2110,7 +2110,7 @@
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; });
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92263.308148.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201128/79e8cf25/attachment.bin>
More information about the llvm-commits
mailing list