summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorRon Lieberman <ronlieb.g@gmail.com>2018-11-30 18:29:17 +0000
committerRon Lieberman <ronlieb.g@gmail.com>2018-11-30 18:29:17 +0000
commitf48e43bbf764bce75b34168abebc0a39a97a4b71 (patch)
tree82e543329a8fc7f4217b0823ed4eda14559b6ec1 /llvm/lib/Target
parentaea706083fde5dd5b625de6bda0e1617059fe53e (diff)
downloadbcm5719-llvm-f48e43bbf764bce75b34168abebc0a39a97a4b71.tar.gz
bcm5719-llvm-f48e43bbf764bce75b34168abebc0a39a97a4b71.zip
[AMDGPU] Disable SReg Global LD/ST, perf regression
Differential Revision: https://reviews.llvm.org/D55093 llvm-svn: 348014
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AMDGPU/SIFixupVectorISel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIFixupVectorISel.cpp b/llvm/lib/Target/AMDGPU/SIFixupVectorISel.cpp
index 3da043f3709..ee39eb04d83 100644
--- a/llvm/lib/Target/AMDGPU/SIFixupVectorISel.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFixupVectorISel.cpp
@@ -43,6 +43,11 @@
using namespace llvm;
+static cl::opt<bool> EnableGlobalSGPRAddr(
+ "amdgpu-enable-global-sgpr-addr",
+ cl::desc("Enable use of SGPR regs for GLOBAL LOAD/STORE instructions"),
+ cl::init(false));
+
STATISTIC(NumSGPRGlobalOccurs, "Number of global ld/st opportunities");
STATISTIC(NumSGPRGlobalSaddrs, "Number of global sgpr instructions converted");
@@ -155,6 +160,8 @@ static bool fixupGlobalSaddr(MachineBasicBlock &MBB,
const GCNSubtarget &ST,
const SIInstrInfo *TII,
const SIRegisterInfo *TRI) {
+ if (!EnableGlobalSGPRAddr)
+ return false;
bool FuncModified = false;
MachineBasicBlock::iterator I, Next;
for (I = MBB.begin(); I != MBB.end(); I = Next) {
OpenPOWER on IntegriCloud