[PATCH] D99269: [AMDGPU] Unify spill code

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 08:02:18 PDT 2021


sebastian-ne created this revision.
sebastian-ne added reviewers: arsenm, RamNalamothu, scott.linder.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, qcolombet.
sebastian-ne requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Instead of reimplementing spilling in prolog and epilog, reuse
loadRegFromStackSlot and storeRegToStackSlot.
Mark the generated instruction as frame-setup or frame-destroy, so the
lowering can use the stack pointer instead of the frame pointer, which
is not set up at this point.

Also fixes a bug where subregisters got overwritten in
pei-scavenge-vgpr-spill.mir.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99269

Files:
  llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
  llvm/lib/Target/AMDGPU/SIPreAllocateWWMRegs.cpp
  llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
  llvm/test/CodeGen/AMDGPU/callee-frame-setup.ll
  llvm/test/CodeGen/AMDGPU/pei-scavenge-vgpr-spill.mir
  llvm/test/CodeGen/AMDGPU/stack-realign.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99269.332995.patch
Type: text/x-patch
Size: 28660 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210324/8531a9d8/attachment-0001.bin>


More information about the llvm-commits mailing list