AMDGPU: add +xnack feature
authorNicolai Haehnle <nhaehnle@gmail.com>
Mon, 4 Jan 2016 23:35:53 +0000 (23:35 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Mon, 4 Jan 2016 23:35:53 +0000 (23:35 +0000)
commitfac1bfe37da03ffee2674250475b3a9e0ba39e64
tree718474d17b2d0dd1446c5cc8b33b1784290fec88
parentbee229d85dd6a7d4f707a6b51f9df841a3788a6c
AMDGPU: add +xnack feature

Summary:
Enabling this feature will account for the two SGPRs used by the hardware
to store the XNACK_MASK physically.

The hardware only requires this reservation when the XNACK feature is
explicitly enabled. At some point, HSA will probably want to do that, but
it does increase SGPR register pressure, so leave it disabled by default
for now (but do add a small test).

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D15869

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256794 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPU.td
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
lib/Target/AMDGPU/AMDGPUSubtarget.cpp
lib/Target/AMDGPU/AMDGPUSubtarget.h
lib/Target/AMDGPU/SIRegisterInfo.cpp
test/CodeGen/AMDGPU/flat-scratch-reg.ll