[PATCH] D103992: [InstCombine / BuildLibCalls] Add parameter attributes from the prototype.

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 16 08:32:30 PDT 2021


jonpa added a comment.

In D103992#2820880 <https://reviews.llvm.org/D103992#2820880>, @efriedma wrote:

> Taking all the attributes from a call to one function and applying them to a call to a different function doesn't make sense to me.  Different functions have different attributes.
>
> There might be a few specific attributes that make sense to transfer, but you'd want to explicitly handle the specific attributes that are relevant.  (For example, pointer alignment.)

It seems that all callers of CreateMemCpy() so far has assumed that taking the attributes of the original call is the right thing to do. The only change here is to not take the Returned attribute.

If this is incorrect, I suppose I should not create the helper function and just remove the Returned attribute where needed for now?


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

https://reviews.llvm.org/D103992



More information about the llvm-commits mailing list