[PATCH] D114872: [MemoryLocation] Move DSE's logic to new MemLoc::getForDest helper (NFC).

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 1 12:29:44 PST 2021


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/MemoryLocation.cpp:143
+    case LibFunc_strncat:
+      return getForArgument(CB, 0, &TLI);
+    default:
----------------
reames wrote:
> I might be missing something, but it looks like these are only handled generically inside MemoryLocation::getForArgument at the moment.  Given the original code specialized for the constant case, and only returned getAfter (not also before), I think this move is not NFC.  
The strncpy logic is added in the parent patch. You're right though that we lose the getAfter/getBeforeOrAfter distinction (though it probably doesn't matter much).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114872/new/

https://reviews.llvm.org/D114872



More information about the llvm-commits mailing list