AMDGPU/GlobalISel: Rewrite lowerFormalArguments
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 19 Jul 2019 14:15:18 +0000 (14:15 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 19 Jul 2019 14:15:18 +0000 (14:15 +0000)
commitfecf43eba3630aeb55c56e5d308f99a7bd05bfbe
treef65a92ab47e7aed8b45afa1e0396de4197491f85
parent3fd917d8860e9bdcabc14c536da4377307906be0
AMDGPU/GlobalISel: Rewrite lowerFormalArguments

This should now handle everything except structs passed as multiple
registers.

I think most of the packing logic should be handled by
handleAssignments, but I'm unclear on what the contract is for
multiple registers. This is copying how x86 handles this.

This does change the behavior of the test_sgpr_alignment0 amdgpu_vs
test. I don't think shader arguments should try to follow the
alignment, and registers need to be repacked. I also don't think it
matters, since I think the pointers are packed to the beginning of the
argument list anyway.

llvm-svn: 366582
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.h
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-amdgpu_vs.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-function-args.ll [new file with mode: 0644]