[PATCH] D14465: AMDGPU: Rework how private buffer passed for HSA

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


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

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.

http://reviews.llvm.org/D14465

Files:
  lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
  lib/Target/AMDGPU/SIFrameLowering.cpp
  lib/Target/AMDGPU/SIISelLowering.cpp
  lib/Target/AMDGPU/SIInstrInfo.cpp
  lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
  lib/Target/AMDGPU/SIMachineFunctionInfo.h
  lib/Target/AMDGPU/SIRegisterInfo.cpp
  lib/Target/AMDGPU/SIRegisterInfo.h
  test/CodeGen/AMDGPU/hsa.ll
  test/CodeGen/AMDGPU/large-alloca-compute.ll
  test/CodeGen/AMDGPU/large-alloca-graphics.ll
  test/CodeGen/AMDGPU/llvm.dbg.value.ll
  test/CodeGen/AMDGPU/local-memory-two-objects.ll
  test/CodeGen/AMDGPU/local-memory.ll
  test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot-compute.ll
  test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot.ll
  test/CodeGen/AMDGPU/work-item-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14465.39585.patch
Type: text/x-patch
Size: 58447 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151106/e81f57e1/attachment.bin>


More information about the llvm-commits mailing list