[PATCH] D86066: IR: Merge MemCpyInlineInst and MemCpyInst

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 15:40:40 PDT 2020


efriedma added a comment.

Having a bunch of boolean modifiers floating around on memcpy sounds miserable for code to deal with; it makes it hard to code to just ignore the "complicated" memcpy operations if it doesn't want to reason about them.  (It's already messy just dealing with volatile operations.)



================
Comment at: llvm/lib/Analysis/Lint.cpp:343
-      MemCpyInlineInst *MCII = cast<MemCpyInlineInst>(&I);
-      const uint64_t Size = MCII->getLength()->getValue().getLimitedValue();
-      visitMemoryReference(I, MCII->getDest(), Size, MCII->getDestAlign(),
----------------
IIRC the reason it was implemented this way is that the length passed to memcpy_inline is marked immarg, so we can be more aggressive.  I guess the paths can be merged, though.


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

https://reviews.llvm.org/D86066



More information about the llvm-commits mailing list