[PATCH] D21623: AMDGPU: Add option to disable spilling SGPRs to VGPRs.
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 15:09:49 PDT 2016
arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: kzhuravl, arsenm.
This can help debug spilling problems.
http://reviews.llvm.org/D21623
Files:
lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
Index: lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
===================================================================
--- lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
+++ 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(false));
// Pin the vtable to this file.
void SIMachineFunctionInfo::anchor() {}
@@ -178,6 +182,9 @@
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());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21623.61616.patch
Type: text/x-patch
Size: 1452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160622/006c9b4a/attachment.bin>
More information about the llvm-commits
mailing list