This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Rework how private buffer passed for HSA
ClosedPublic

Authored by arsenm on Nov 6 2015, 1:44 PM.

Details

Summary

If we know we have stack objects, we reserve the registers
that the private buffer resource and wave offset are passed
and use them directly.

If not, reserve the last 5 SGPRs just in case we need to spill.
After register allocation, try to pick the next available registers
instead of the last SGPRs, and then insert copies from the inputs
to the reserved registers in the progloue.

This also only selectively enables all of the input registers
which are really required instead of always enabling them.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 39585.Nov 6 2015, 1:44 PM
arsenm retitled this revision from to AMDGPU: Rework how private buffer passed for HSA.
arsenm updated this object.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
arsenm added a comment.Nov 8 2015, 5:09 PM

This requires a driver change in mesa to not hard code some of the pgm_rsrc2 bits

arsenm accepted this revision.Nov 30 2015, 1:20 PM
arsenm added a reviewer: arsenm.

r254331

This revision is now accepted and ready to land.Nov 30 2015, 1:20 PM
arsenm closed this revision.Nov 30 2015, 1:20 PM