]> granicus.if.org Git - llvm/commit
AMDGPU: Implement SGPR spilling with scalar stores
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 13 Nov 2016 18:20:54 +0000 (18:20 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 13 Nov 2016 18:20:54 +0000 (18:20 +0000)
commit4404d0d6e354e80dd7f8f0a0e12d8ad809cf007e
tree241f2945eaa0a02c3daa743351e2f082a17341f9
parentb70e96e2585f7413c4a0f90793974c937a686d89
AMDGPU: Implement SGPR spilling with scalar stores

nThis avoids the nasty problems caused by using
memory instructions that read the exec mask while
spilling / restoring registers used for control flow
masking, but only for VI when these were added.

This always uses the scalar stores when enabled currently,
but it may be better to still try to spill to a VGPR
and use this on the fallback memory path.

The cache also needs to be flushed before wave termination
if a scalar store is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286766 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIInsertWaits.cpp
lib/Target/AMDGPU/SIInstrInfo.cpp
lib/Target/AMDGPU/SIRegisterInfo.cpp
test/CodeGen/AMDGPU/attr-amdgpu-num-sgpr.ll
test/CodeGen/AMDGPU/basic-branch.ll
test/CodeGen/AMDGPU/si-spill-sgpr-stack.ll
test/CodeGen/AMDGPU/spill-m0.ll
test/CodeGen/MIR/AMDGPU/scalar-store-cache-flush.mir [new file with mode: 0644]