[PATCH] D79744: clang: Use byref for aggregate kernel arguments
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 23 09:51:53 PDT 2020
arsenm added a comment.
In D79744#2165929 <https://reviews.llvm.org/D79744#2165929>, @rjmccall wrote:
> 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.
Yes, it's semantically needed to insert the copy from constant memory. I originally interpreted a copy as necessary if the indirect addrspace did not match the stack address space, which is a sort of roundabout way of achieving the same thing
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79744/new/
https://reviews.llvm.org/D79744
More information about the cfe-commits
mailing list