If the only VGPRs used for SGPR spilling were not CSRs, this was
enabling all laness and immediately restoring exec. This is the usual
situation in leaf functions.
Details
Details
- Reviewers
rampitec
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Not sure what register you mean. Reserving registers generally causes more problems that it solves. Reserving VGPRs for SGPR spills would require reserving 2 to cover all possible SGPR spills
Comment Actions
I mean we can do it conditionally if we have a call stack. Normally you would only need one VGPR, but again that requires whole program analysis.
Comment Actions
I think for a recursive call, you could need more than 2 VGPRs, so eventually you would still need to spill one to memory
Comment Actions
JBTW, strictly speaking you do not need a full wave and 256 bytes of scratch loads and stores per VGPR. Only first min(wavefrontsize, # of SGPRs spilled) lanes are needed.