summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/Utils
diff options
context:
space:
mode:
authorKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>2017-10-14 15:59:07 +0000
committerKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>2017-10-14 15:59:07 +0000
commiteda425edd4df482569c8ca42650d98dbf819a47e (patch)
treeaa8a7f08418e94be03ccd93be946cdd5eb11fc40 /llvm/lib/Target/AMDGPU/Utils
parent346bd6a2082416d1e23cd4483c1a36db2ca6d8cf (diff)
downloadbcm5719-llvm-eda425edd4df482569c8ca42650d98dbf819a47e.tar.gz
bcm5719-llvm-eda425edd4df482569c8ca42650d98dbf819a47e.zip
AMDGPU: Do not emit deprecated notes for code object v3
Differential Revision: https://reviews.llvm.org/D38749 llvm-svn: 315810
Diffstat (limited to 'llvm/lib/Target/AMDGPU/Utils')
-rw-r--r--llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp4
-rw-r--r--llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
index ce9dc4f744d..018cb5d0c36 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -162,6 +162,10 @@ void streamIsaVersion(const MCSubtargetInfo *STI, raw_ostream &Stream) {
Stream.flush();
}
+bool hasCodeObjectV3(const FeatureBitset &Features) {
+ return Features.test(FeatureCodeObjectV3);
+}
+
unsigned getWavefrontSize(const FeatureBitset &Features) {
if (Features.test(FeatureWavefrontSize16))
return 16;
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
index aaa7b1495d7..60a7af837fb 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
@@ -58,6 +58,10 @@ IsaVersion getIsaVersion(const FeatureBitset &Features);
/// \brief Streams isa version string for given subtarget \p STI into \p Stream.
void streamIsaVersion(const MCSubtargetInfo *STI, raw_ostream &Stream);
+/// \returns True if given subtarget \p Features support code object version 3,
+/// false otherwise.
+bool hasCodeObjectV3(const FeatureBitset &Features);
+
/// \returns Wavefront size for given subtarget \p Features.
unsigned getWavefrontSize(const FeatureBitset &Features);
OpenPOWER on IntegriCloud