diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-06-23 20:00:34 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-06-23 20:00:34 +0000 |
commit | 8d4b0eddd613567b4f29088972b43104d8234f94 (patch) | |
tree | edb467e425651c475ef95a95eedbd3d842a1a347 /llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | |
parent | fe9d1ee9e45c91fab05c69e672117efd4ed8c0cc (diff) | |
download | bcm5719-llvm-8d4b0eddd613567b4f29088972b43104d8234f94.tar.gz bcm5719-llvm-8d4b0eddd613567b4f29088972b43104d8234f94.zip |
AMDGPU: Add option to disable spilling SGPRs to VGPRs.
This can help debug spilling problems.
llvm-svn: 273605
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp index 2b7c0f3a2e8..faab72ca9f9 100644 --- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp +++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp @@ -1,11 +1,10 @@ -//===-- SIMachineFunctionInfo.cpp - SI Machine Function Info -------===// +//===-- SIMachineFunctionInfo.cpp -------- SI Machine Function Info -------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -/// \file //===----------------------------------------------------------------------===// @@ -22,6 +21,11 @@ using namespace llvm; +static cl::opt<bool> EnableSpillSGPRToVGPR( + "amdgpu-spill-sgpr-to-vgpr", + cl::desc("Enable spilling VGPRs to SGPRs"), + cl::ReallyHidden, + cl::init(true)); // Pin the vtable to this file. void SIMachineFunctionInfo::anchor() {} @@ -178,6 +182,9 @@ SIMachineFunctionInfo::SpilledReg SIMachineFunctionInfo::getSpilledReg( MachineFunction *MF, unsigned FrameIndex, unsigned SubIdx) { + if (!EnableSpillSGPRToVGPR) + return SpilledReg(); + MachineFrameInfo *FrameInfo = MF->getFrameInfo(); const SIRegisterInfo *TRI = static_cast<const SIRegisterInfo *>( MF->getSubtarget<AMDGPUSubtarget>().getRegisterInfo()); |