I don't think this is actually defined for mesa, but this is what we
were doing on the DAG path.
Details
Diff Detail
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp | ||
---|---|---|
505–509 | Isn’t this already handled here for HSA? |
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp | ||
---|---|---|
505–509 | The GISel version is factored a bit differently with a cleaner break between the kernel and non-kernel handling. allocateHSAUserSGPRs isn't called on the shader path (it's a bit ugly that it is for the DAG and it happens to work out). Mesa should have some kind of ABI definition for flat scratch, but in the absence of one, we still need to produce something. This matches the DAG behavior. Alternatively I could switch mesa to follow what PAL does, but that would be a separate potentially breaking change |
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp | ||
---|---|---|
505–509 | I’d prefer to change the SDAG to do the same for mesa as is done for PAL. |
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp | ||
---|---|---|
505–509 | I'm not attempting to address mesa's flat usage. if that change goes ahead, both would update in the future. For now gisel should just match behavior |
Isn’t this already handled here for HSA?
I didn’t hear of mesa using flat scratch (and we don’t have any flat-scratch+mesa test), so should we update the dag code instead? I wonder why we are calling allocateHSAUserSGPRs for non-HSA platforms in the SDAG.