[PATCH] D36171: AMDGPU: Use direct struct returns

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 1 13:22:53 PDT 2017


arsenm created this revision.
Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng, kzhuravl.

This is an improvement over always using byval for
structs.

      

This will use registers until ~16 are used, and then
switch back to byval. This needs more work, since I'm
not sure it ever really makes sense to use byval. If
the register limit is exceeded, the arguments still
end up passed on the stack, but with a different ABI.
It also may make sense to base this on number of
registers used for non-struct arguments, rather than
just arguments that appear first in the argument list.


https://reviews.llvm.org/D36171

Files:
  lib/CodeGen/TargetInfo.cpp
  test/CodeGenOpenCL/addr-space-struct-arg.cl
  test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
  test/CodeGenOpenCL/amdgpu-nullptr.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36171.109191.patch
Type: text/x-patch
Size: 35755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170801/0cd2fa73/attachment-0001.bin>


More information about the cfe-commits mailing list