[PATCH] D79744: clang: Use byref for aggregate kernel arguments

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 21 22:03:12 PDT 2020


rjmccall added a comment.

Arguably we should add this attribute to all indirect arguments.  I can understand not wanting to update all the test cases, but you could probably avoid adding a new IndirectByRef kind of ABIArgInfo by treating kernels specially in ConstructAttributeList.

Or, sorry, I forget — is this semantically necessary because the argument is to constant memory and the callee has to copy it to form the mutable local?  If so, I think (1) the above statement about theoretically using `byref` on all arguments still applies and (2) we do need a new ABIArgInfo kind, but we should name it something like IndirectAliased.


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

https://reviews.llvm.org/D79744





More information about the cfe-commits mailing list