[PATCH] D93523: [DSE] Use correct memory location for read clobber check

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 05:45:49 PST 2020


fhahn 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 {
----------------
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.


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