[PATCH] D14461: AMDGPU: Remove SIPrepareScratchRegs

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 13:41:18 PST 2015


arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: arsenm, qcolombet.

It does not work because of emergency stack slots.
This pass was supposed to eliminate dummy registers for the
spill instructions, but the register scavenger can introduce
more during PrologEpilogInserter, so some would end up
left behind if they were needed.
    
The potential for spilling the scratch resource descriptor
and offset register makes doing something like this
overly complicated. Reserve registers to use for the resource
descriptor and use them directly in eliminateFrameIndex.
    
Also removes creating another scratch resource descriptor
when directly selecting scratch MUBUF instructions.
    
The choice of which registers are reserved is temporary.
For now it attempts to pick the next available registers
after the user and system SGPRs.

http://reviews.llvm.org/D14461

Files:
  lib/Target/AMDGPU/AMDGPU.h
  lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
  lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  lib/Target/AMDGPU/CMakeLists.txt
  lib/Target/AMDGPU/SIFrameLowering.cpp
  lib/Target/AMDGPU/SIFrameLowering.h
  lib/Target/AMDGPU/SIISelLowering.cpp
  lib/Target/AMDGPU/SIISelLowering.h
  lib/Target/AMDGPU/SIInstrInfo.cpp
  lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
  lib/Target/AMDGPU/SIMachineFunctionInfo.h
  lib/Target/AMDGPU/SIPrepareScratchRegs.cpp
  lib/Target/AMDGPU/SIRegisterInfo.cpp
  test/CodeGen/AMDGPU/kernel-args.ll
  test/CodeGen/AMDGPU/large-alloca-compute.ll
  test/CodeGen/AMDGPU/large-alloca-graphics.ll
  test/CodeGen/AMDGPU/large-alloca.ll
  test/CodeGen/AMDGPU/si-sgpr-spill.ll
  test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot-compute.ll
  test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14461.39581.patch
Type: text/x-patch
Size: 67706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151106/89ebe108/attachment.bin>


More information about the llvm-commits mailing list