[Libclc-dev] [PATCH 4/4] r600: Convert barrier to clc
Jan Vesely via Libclc-dev
libclc-dev at lists.llvm.org
Sun Oct 28 23:40:29 PDT 2018
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
r600/lib/OVERRIDES_3.9 | 1 -
r600/lib/OVERRIDES_4.0 | 1 -
r600/lib/OVERRIDES_5.0 | 1 -
r600/lib/OVERRIDES_6.0 | 1 -
r600/lib/SOURCES | 2 +-
r600/lib/SOURCES_3.9 | 1 -
r600/lib/SOURCES_4.0 | 1 -
r600/lib/SOURCES_5.0 | 1 -
r600/lib/SOURCES_6.0 | 1 -
r600/lib/synchronization/barrier.cl | 9 +++++++++
r600/lib/synchronization/barrier_impl.39.ll | 13 -------------
r600/lib/synchronization/barrier_impl.ll | 13 -------------
12 files changed, 10 insertions(+), 35 deletions(-)
delete mode 100644 r600/lib/OVERRIDES_3.9
delete mode 100644 r600/lib/OVERRIDES_4.0
delete mode 100644 r600/lib/OVERRIDES_5.0
delete mode 100644 r600/lib/OVERRIDES_6.0
delete mode 100644 r600/lib/SOURCES_4.0
delete mode 100644 r600/lib/SOURCES_5.0
delete mode 100644 r600/lib/SOURCES_6.0
create mode 100644 r600/lib/synchronization/barrier.cl
delete mode 100644 r600/lib/synchronization/barrier_impl.39.ll
delete mode 100644 r600/lib/synchronization/barrier_impl.ll
diff --git a/r600/lib/OVERRIDES_3.9 b/r600/lib/OVERRIDES_3.9
deleted file mode 100644
index c99f3fc..0000000
--- a/r600/lib/OVERRIDES_3.9
+++ /dev/null
@@ -1 +0,0 @@
-synchronization/barrier_impl.ll
diff --git a/r600/lib/OVERRIDES_4.0 b/r600/lib/OVERRIDES_4.0
deleted file mode 100644
index c99f3fc..0000000
--- a/r600/lib/OVERRIDES_4.0
+++ /dev/null
@@ -1 +0,0 @@
-synchronization/barrier_impl.ll
diff --git a/r600/lib/OVERRIDES_5.0 b/r600/lib/OVERRIDES_5.0
deleted file mode 100644
index c99f3fc..0000000
--- a/r600/lib/OVERRIDES_5.0
+++ /dev/null
@@ -1 +0,0 @@
-synchronization/barrier_impl.ll
diff --git a/r600/lib/OVERRIDES_6.0 b/r600/lib/OVERRIDES_6.0
deleted file mode 100644
index c99f3fc..0000000
--- a/r600/lib/OVERRIDES_6.0
+++ /dev/null
@@ -1 +0,0 @@
-synchronization/barrier_impl.ll
diff --git a/r600/lib/SOURCES b/r600/lib/SOURCES
index b3180ed..4342ac3 100644
--- a/r600/lib/SOURCES
+++ b/r600/lib/SOURCES
@@ -1,6 +1,6 @@
math/fmax.cl
math/fmin.cl
-synchronization/barrier_impl.ll
+synchronization/barrier.cl
workitem/get_global_offset.cl
workitem/get_group_id.cl
workitem/get_global_size.cl
diff --git a/r600/lib/SOURCES_3.9 b/r600/lib/SOURCES_3.9
index 560a86d..a44a9ce 100644
--- a/r600/lib/SOURCES_3.9
+++ b/r600/lib/SOURCES_3.9
@@ -13,4 +13,3 @@ image/write_imagef.cl
image/write_imagei.cl
image/write_imageui.cl
image/write_image_impl.ll
-synchronization/barrier_impl.39.ll
diff --git a/r600/lib/SOURCES_4.0 b/r600/lib/SOURCES_4.0
deleted file mode 100644
index 3c56d80..0000000
--- a/r600/lib/SOURCES_4.0
+++ /dev/null
@@ -1 +0,0 @@
-synchronization/barrier_impl.39.ll
diff --git a/r600/lib/SOURCES_5.0 b/r600/lib/SOURCES_5.0
deleted file mode 100644
index 3c56d80..0000000
--- a/r600/lib/SOURCES_5.0
+++ /dev/null
@@ -1 +0,0 @@
-synchronization/barrier_impl.39.ll
diff --git a/r600/lib/SOURCES_6.0 b/r600/lib/SOURCES_6.0
deleted file mode 100644
index 3c56d80..0000000
--- a/r600/lib/SOURCES_6.0
+++ /dev/null
@@ -1 +0,0 @@
-synchronization/barrier_impl.39.ll
diff --git a/r600/lib/synchronization/barrier.cl b/r600/lib/synchronization/barrier.cl
new file mode 100644
index 0000000..98200e7
--- /dev/null
+++ b/r600/lib/synchronization/barrier.cl
@@ -0,0 +1,9 @@
+#include <clc/clc.h>
+
+_CLC_DEF void __clc_r600_barrier(void) __asm("llvm.r600.group.barrier");
+
+_CLC_DEF void barrier(uint flags)
+{
+ // We should call mem_fence here, but that is not implemented for r600 yet
+ __clc_r600_barrier();
+}
diff --git a/r600/lib/synchronization/barrier_impl.39.ll b/r600/lib/synchronization/barrier_impl.39.ll
deleted file mode 100644
index 3bd3167..0000000
--- a/r600/lib/synchronization/barrier_impl.39.ll
+++ /dev/null
@@ -1,13 +0,0 @@
-declare void @llvm.r600.group.barrier() #0
-
-target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
-
-define void @barrier(i32 %flags) #1 {
-entry:
- ; We should call mem_fence here, but that is not implemented for r600 yet
- tail call void @llvm.r600.group.barrier()
- ret void
-}
-
-attributes #0 = { nounwind convergent }
-attributes #1 = { nounwind convergent alwaysinline }
diff --git a/r600/lib/synchronization/barrier_impl.ll b/r600/lib/synchronization/barrier_impl.ll
deleted file mode 100644
index f1cbc9a..0000000
--- a/r600/lib/synchronization/barrier_impl.ll
+++ /dev/null
@@ -1,13 +0,0 @@
-declare void @llvm.r600.group.barrier() #0
-
-target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5"
-
-define void @barrier(i32 %flags) #1 {
-entry:
- ; We should call mem_fence here, but that is not implemented for r600 yet
- tail call void @llvm.r600.group.barrier()
- ret void
-}
-
-attributes #0 = { nounwind convergent }
-attributes #1 = { nounwind convergent alwaysinline }
--
2.18.1
More information about the Libclc-dev
mailing list