diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-07-19 14:15:18 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-07-19 14:15:18 +0000 |
| commit | fecf43eba3630aeb55c56e5d308f99a7bd05bfbe (patch) | |
| tree | f65a92ab47e7aed8b45afa1e0396de4197491f85 /llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h | |
| parent | 3fd917d8860e9bdcabc14c536da4377307906be0 (diff) | |
| download | bcm5719-llvm-fecf43eba3630aeb55c56e5d308f99a7bd05bfbe.tar.gz bcm5719-llvm-fecf43eba3630aeb55c56e5d308f99a7bd05bfbe.zip | |
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
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h b/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h index 3599659cac6..97f8c85b9e7 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h @@ -29,7 +29,16 @@ class AMDGPUCallLowering: public CallLowering { uint64_t Offset, unsigned Align, Register DstReg) const; - public: + /// A function of this type is used to perform value split action. + using SplitArgTy = std::function<void(ArrayRef<Register>, LLT, LLT)>; + + void splitToValueTypes(const ArgInfo &OrigArgInfo, + SmallVectorImpl<ArgInfo> &SplitArgs, + const DataLayout &DL, MachineRegisterInfo &MRI, + CallingConv::ID CallConv, + SplitArgTy SplitArg) const; + +public: AMDGPUCallLowering(const AMDGPUTargetLowering &TLI); bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, |

