mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-24 21:00:36 +00:00
AMDGPU: Add option to disable spilling SGPRs to VGPRs.
This can help debug spilling problems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273605 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8e5f16719c
commit
dfb588ccfc
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user