[PATCH] D89885: [MemLoc] Adjust memccpy support in MemoryLocation::getForArgument

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 06:33:37 PDT 2020


fhahn added inline comments.


================
Comment at: llvm/lib/Analysis/MemoryLocation.cpp:261
+      if (ArgIdx == 0)
+        // It is not known how many bytes are written to the dest arg.
+        break;
----------------
xbolva00 wrote:
> fhahn wrote:
> > I think it might be slightly better to mention here that we only know an upper bound on the number of bytes written and this upper bound is unsafe to use for writes.
> Ok, I will change the comment.
> 
> There is a LocationSize::upperBound(..),  maybe it should be possible to use it here?
Yes, it would probably be best to use `upperBound` unconditionally here for both read and write.


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

https://reviews.llvm.org/D89885



More information about the llvm-commits mailing list