summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/GCNSubtarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/AMDGPU/GCNSubtarget.h')
-rw-r--r--llvm/lib/Target/AMDGPU/GCNSubtarget.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/GCNSubtarget.h b/llvm/lib/Target/AMDGPU/GCNSubtarget.h
index f34e1051da80..d60960f9d98c 100644
--- a/llvm/lib/Target/AMDGPU/GCNSubtarget.h
+++ b/llvm/lib/Target/AMDGPU/GCNSubtarget.h
@@ -161,6 +161,7 @@ protected:
bool FlatScratchInsts;
bool ScalarFlatScratchInsts;
bool HasArchitectedFlatScratch;
+ bool EnableFlatScratch;
bool AddNoCarryInsts;
bool HasUnpackedD16VMem;
bool LDSMisalignedBug;
@@ -565,6 +566,11 @@ public:
return ScalarFlatScratchInsts;
}
+ bool enableFlatScratch() const {
+ return flatScratchIsArchitected() ||
+ (EnableFlatScratch && hasFlatScratchInsts());
+ }
+
bool hasGlobalAddTidInsts() const {
return GFX10_BEncoding;
}
@@ -765,8 +771,6 @@ public:
return true;
}
- bool enableFlatScratch() const;
-
void overrideSchedPolicy(MachineSchedPolicy &Policy,
unsigned NumRegionInstrs) const override;