summaryrefslogtreecommitdiffstats
path: root/libclc
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2018-08-03 15:14:08 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2018-08-03 15:14:08 +0000
commitfaa1ff16c1716d92d907060f713a14fbca4a7ea7 (patch)
treeba50667fdbbab9a8c01a0e97a903b1ea654f0152 /libclc
parent8ca2eff97cc50eb99744feca19ffe82c7b85d6c9 (diff)
downloadbcm5719-llvm-faa1ff16c1716d92d907060f713a14fbca4a7ea7.tar.gz
bcm5719-llvm-faa1ff16c1716d92d907060f713a14fbca4a7ea7.zip
amdgcn: Use __constant AS for amdgcn builtins.
Fixes build after clang r338707. Reviewer: Matthew.Arsenault@amd.com Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 338898
Diffstat (limited to 'libclc')
-rw-r--r--libclc/amdgcn-amdhsa/lib/workitem/get_global_size.cl4
-rw-r--r--libclc/amdgcn-amdhsa/lib/workitem/get_local_size.cl4
-rw-r--r--libclc/amdgcn/lib/workitem/get_global_offset.cl4
-rw-r--r--libclc/amdgcn/lib/workitem/get_work_dim.cl4
4 files changed, 12 insertions, 4 deletions
diff --git a/libclc/amdgcn-amdhsa/lib/workitem/get_global_size.cl b/libclc/amdgcn-amdhsa/lib/workitem/get_global_size.cl
index 2289615a6d4..392cd08e08f 100644
--- a/libclc/amdgcn-amdhsa/lib/workitem/get_global_size.cl
+++ b/libclc/amdgcn-amdhsa/lib/workitem/get_global_size.cl
@@ -1,6 +1,8 @@
#include <clc/clc.h>
-#if __clang_major__ >= 7
+#if __clang_major__ >= 8
+#define CONST_AS __constant
+#elif __clang_major__ >= 7
#define CONST_AS __attribute__((address_space(4)))
#else
#define CONST_AS __attribute__((address_space(2)))
diff --git a/libclc/amdgcn-amdhsa/lib/workitem/get_local_size.cl b/libclc/amdgcn-amdhsa/lib/workitem/get_local_size.cl
index 034c6d95cf3..64d1cf48224 100644
--- a/libclc/amdgcn-amdhsa/lib/workitem/get_local_size.cl
+++ b/libclc/amdgcn-amdhsa/lib/workitem/get_local_size.cl
@@ -1,6 +1,8 @@
#include <clc/clc.h>
-#if __clang_major__ >= 7
+#if __clang_major__ >= 8
+#define CONST_AS __constant
+#elif __clang_major__ >= 7
#define CONST_AS __attribute__((address_space(4)))
#else
#define CONST_AS __attribute__((address_space(2)))
diff --git a/libclc/amdgcn/lib/workitem/get_global_offset.cl b/libclc/amdgcn/lib/workitem/get_global_offset.cl
index 0c2b948d764..0a87cd23f1f 100644
--- a/libclc/amdgcn/lib/workitem/get_global_offset.cl
+++ b/libclc/amdgcn/lib/workitem/get_global_offset.cl
@@ -1,6 +1,8 @@
#include <clc/clc.h>
-#if __clang_major__ >= 7
+#if __clang_major__ >= 8
+#define CONST_AS __constant
+#elif __clang_major__ >= 7
#define CONST_AS __attribute__((address_space(4)))
#else
#define CONST_AS __attribute__((address_space(2)))
diff --git a/libclc/amdgcn/lib/workitem/get_work_dim.cl b/libclc/amdgcn/lib/workitem/get_work_dim.cl
index 8eb81ba63e9..3add9b64f05 100644
--- a/libclc/amdgcn/lib/workitem/get_work_dim.cl
+++ b/libclc/amdgcn/lib/workitem/get_work_dim.cl
@@ -1,6 +1,8 @@
#include <clc/clc.h>
-#if __clang_major__ >= 7
+#if __clang_major__ >= 8
+#define CONST_AS __constant
+#elif __clang_major__ >= 7
#define CONST_AS __attribute__((address_space(4)))
#else
#define CONST_AS __attribute__((address_space(2)))
OpenPOWER on IntegriCloud