AMDGPU: Always allocate emergency stack slot at offset 0
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 22 Feb 2017 21:05:25 +0000 (21:05 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 22 Feb 2017 21:05:25 +0000 (21:05 +0000)
commit138d42906522a5fff55a52154d245b5fc5fac9b3
tree7ed72a47c2a5a8f9aed2b995992d7c127da9e6e4
parentca81270fb4ef32dcdf5b3c60b111c757ecf636d9
AMDGPU: Always allocate emergency stack slot at offset 0

This allows us to ensure that 0 is never a valid pointer
to a user object, and ensures that the offset is always legal
without needing a register to access it. This comes at the cost
of usable offsets and wasted stack space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295877 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
lib/Target/AMDGPU/SIFrameLowering.cpp
test/CodeGen/AMDGPU/amdgpu.private-memory.ll
test/CodeGen/AMDGPU/array-ptr-calc-i32.ll
test/CodeGen/AMDGPU/captured-frame-index.ll
test/CodeGen/AMDGPU/cgp-addressing-modes.ll
test/CodeGen/AMDGPU/commute-compares.ll
test/CodeGen/AMDGPU/control-flow-fastregalloc.ll
test/CodeGen/AMDGPU/extload-private.ll
test/CodeGen/AMDGPU/insert_vector_elt.ll
test/CodeGen/AMDGPU/kernarg-stack-alignment.ll
test/CodeGen/AMDGPU/local-stack-slot-bug.ll
test/CodeGen/AMDGPU/private-element-size.ll
test/CodeGen/AMDGPU/scratch-buffer.ll
test/CodeGen/AMDGPU/si-spill-sgpr-stack.ll
test/CodeGen/AMDGPU/spill-m0.ll
test/CodeGen/AMDGPU/spill-wide-sgpr.ll
test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot-compute.ll
test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot.ll
test/CodeGen/AMDGPU/wqm.ll