]> granicus.if.org Git - clang/commit
AMDGPU: Use direct struct returns and arguments
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 9 Aug 2017 21:44:58 +0000 (21:44 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 9 Aug 2017 21:44:58 +0000 (21:44 +0000)
commitf535ad0f83b2f90343cafbf8f929d6c956747263
treefae4669d2aa6d463453481ceb786b3c39a0e1663
parent869572fe0ab25b9ebf928079bcb84110534c48d7
AMDGPU: Use direct struct returns and arguments

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310527 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetInfo.cpp
test/CodeGenOpenCL/addr-space-struct-arg.cl
test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
test/CodeGenOpenCL/amdgpu-nullptr.cl