[PATCH] D66838: AMDGPU: Handle frame index expansion with no free SGPRs pre gfx9

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 15:45:22 PDT 2019


arsenm created this revision.
arsenm added a reviewer: rampitec.
Herald added subscribers: arphaman, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl.
arsenm added a parent revision: D66629: AMDGPU: Don't use frame virtual registers.

Since an add instruction must produce an unused carry out, this
requires additional SGPRs. This can be avoided by keeping the entire
offset computation in SGPRs. If one SGPR is still available, this only
costs one extra mov. If none are available, the entire computation can
 be done in place and reversed.

      

This does assume the use is a VGPR operand. This was already assumed,
and we currently only select frame indexes to VALU instructions. This
should probably be fixed at some point to handle more possible MIR.


https://reviews.llvm.org/D66838

Files:
  lib/Target/AMDGPU/SIInstrInfo.cpp
  lib/Target/AMDGPU/SIRegisterInfo.cpp
  test/CodeGen/AMDGPU/pei-scavenge-sgpr-carry-out.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66838.217516.patch
Type: text/x-patch
Size: 13495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190827/06dcef8a/attachment.bin>


More information about the llvm-commits mailing list