[PATCH] D26005: AMDGPU: Don't use stack space for SGPR->VGPR spills

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 12:29:38 PDT 2016


arsenm created this revision.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: tony-tye, yaxunl, nhaehnle, wdng, kzhuravl, qcolombet.
Herald added a reviewer: tstellarAMD.

Before frame offsets are calculated, try to eliminate the
frame indexes used by SGPR spills. Then we can delete them
after.

      

I think for now we can be sure that no other instruction
will be re-using the same frame indexes. It should be easy
to notice if this assumption ever breaks since everything
asserts if it tries to use a dead frame index later.

      

The unused emergency stack slot seems to still be left behind,
so an additional 4 bytes is still wasted.


https://reviews.llvm.org/D26005

Files:
  lib/Target/AMDGPU/SIFrameLowering.cpp
  lib/Target/AMDGPU/SIInstrInfo.cpp
  lib/Target/AMDGPU/SIRegisterInfo.cpp
  test/CodeGen/AMDGPU/attr-amdgpu-num-sgpr.ll
  test/CodeGen/AMDGPU/private-access-no-objects.ll
  test/CodeGen/AMDGPU/si-sgpr-spill.ll
  test/CodeGen/AMDGPU/spill-alloc-sgpr-init-bug.ll
  test/CodeGen/AMDGPU/spill-m0.ll
  test/CodeGen/AMDGPU/wqm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26005.75928.patch
Type: text/x-patch
Size: 21456 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161026/c64950f1/attachment.bin>


More information about the llvm-commits mailing list