There is no need to generate spill/restore for registers used in
return value. This matters for amdgpu_gfx calling convention
where CSR and Ret definitions overlap.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
As pointed out by @sebastian-ne the other way to solve this is to remove the overlap of CSRs and return registers in amdgpu_gfx.
Thanks for the update. Looks good to me, but I'm not very familiar with this, so I'm leaving approval for someone else.
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | ||
---|---|---|
1521 | I assume this is only a short-term fix until revising the gfx ABI to move return VGPRs into the scratch regs range to avoid the CSR spills/restores. |
LGTM if there are no further concerns from @cdevadas.
Just to check, I suppose calls to functions with that many return values are already handled fine?
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | ||
---|---|---|
1521 | I think this is a long-term solution :) |
I assume this is only a short-term fix until revising the gfx ABI to move return VGPRs into the scratch regs range to avoid the CSR spills/restores.