[PATCH] D86815: [LangRef] Adjust guarantee for llvm.memcpy to also allow equal arguments.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 13:45:49 PDT 2020


fhahn added a comment.

In D86815#2250371 <https://reviews.llvm.org/D86815#2250371>, @rjmccall wrote:

> In D86815#2250283 <https://reviews.llvm.org/D86815#2250283>, @fhahn wrote:
>
>> In D86815#2249028 <https://reviews.llvm.org/D86815#2249028>, @nlopes wrote:
>>
>>> If clang doesn't have a document stating the assumptions made about the run-time libraries (couldn't quickly find it), it might be useful to have one and mention this.
>>
>> That sounds good, but I am not sure where this should be documented on the Clang side. I think this can also be done separately.
>
> I agree that Clang should document this.  Isn't there another technically-undefined assumption that LLVM makes about memcpy, like that it accepts bad pointers if the size is zero?  Seems like that should be documented in the same place.
>
> That place is probably the same general section of the manual that documents our implementation-defined behavior and implementation limits, which, er, doesn't currently exist.

Should this happen together with this patch? We should add such a document, but that's probably better as a separate change, as it only concerns clang.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86815



More information about the llvm-commits mailing list