[PATCH] D93523: [DSE] Use correct memory location for read clobber check
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 18 09:06:51 PST 2020
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1944
// Find the next clobbering Mod access for DefLoc, starting at StartAccess.
+ Optional<MemoryLocation> CurrentLoc;
do {
----------------
fhahn wrote:
> Can this just be `MemoryLocation CurrentLoc`? We should skip the case when it would be `None` and it should always be `!= None` before after the loop.
This uses Optional<MemoryLocation> because getLocForWriteEx() returns it that way. Should I copy it into a separate non-Optional variable after the check that it is not None?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93523/new/
https://reviews.llvm.org/D93523
More information about the llvm-commits
mailing list