[llvm-branch-commits] [libclc] libclc: Remove target opencl copies of mem_fence (PR #185207)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Mar 7 09:25:59 PST 2026
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/185207
None
>From 9f2f6fa9e2210304f33dd5faf9a3264c3d834edf Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Sat, 7 Mar 2026 17:47:37 +0100
Subject: [PATCH] libclc: Remove target opencl copies of mem_fence
---
libclc/opencl/lib/amdgcn/SOURCES | 1 -
libclc/opencl/lib/amdgcn/mem_fence/fence.cl | 31 -------------------
libclc/opencl/lib/ptx-nvidiacl/SOURCES | 1 -
.../lib/ptx-nvidiacl/mem_fence/fence.cl | 31 -------------------
4 files changed, 64 deletions(-)
delete mode 100644 libclc/opencl/lib/amdgcn/mem_fence/fence.cl
delete mode 100644 libclc/opencl/lib/ptx-nvidiacl/SOURCES
delete mode 100644 libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl
diff --git a/libclc/opencl/lib/amdgcn/SOURCES b/libclc/opencl/lib/amdgcn/SOURCES
index ad2b4ca6589ed..a21f6f0ad44b0 100644
--- a/libclc/opencl/lib/amdgcn/SOURCES
+++ b/libclc/opencl/lib/amdgcn/SOURCES
@@ -1,3 +1,2 @@
-mem_fence/fence.cl
subgroup/subgroup.cl
synchronization/sub_group_barrier.cl
diff --git a/libclc/opencl/lib/amdgcn/mem_fence/fence.cl b/libclc/opencl/lib/amdgcn/mem_fence/fence.cl
deleted file mode 100644
index 38fb15c2c1de8..0000000000000
--- a/libclc/opencl/lib/amdgcn/mem_fence/fence.cl
+++ /dev/null
@@ -1,31 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <clc/mem_fence/clc_mem_fence.h>
-#include <clc/opencl/synchronization/utils.h>
-
-_CLC_DEF _CLC_OVERLOAD void mem_fence(cl_mem_fence_flags flags) {
- int memory_scope = __MEMORY_SCOPE_WRKGRP;
- int memory_order = __ATOMIC_ACQ_REL;
- __CLC_MemorySemantics memory_semantics = __opencl_get_memory_semantics(flags);
- __clc_mem_fence(memory_scope, memory_order, memory_semantics);
-}
-
-_CLC_DEF _CLC_OVERLOAD void read_mem_fence(cl_mem_fence_flags flags) {
- int memory_scope = __MEMORY_SCOPE_WRKGRP;
- int memory_order = __ATOMIC_ACQUIRE;
- __CLC_MemorySemantics memory_semantics = __opencl_get_memory_semantics(flags);
- __clc_mem_fence(memory_scope, memory_order, memory_semantics);
-}
-
-_CLC_DEF _CLC_OVERLOAD void write_mem_fence(cl_mem_fence_flags flags) {
- int memory_scope = __MEMORY_SCOPE_WRKGRP;
- int memory_order = __ATOMIC_RELEASE;
- __CLC_MemorySemantics memory_semantics = __opencl_get_memory_semantics(flags);
- __clc_mem_fence(memory_scope, memory_order, memory_semantics);
-}
diff --git a/libclc/opencl/lib/ptx-nvidiacl/SOURCES b/libclc/opencl/lib/ptx-nvidiacl/SOURCES
deleted file mode 100644
index f20917346a3bc..0000000000000
--- a/libclc/opencl/lib/ptx-nvidiacl/SOURCES
+++ /dev/null
@@ -1 +0,0 @@
-mem_fence/fence.cl
diff --git a/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl b/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl
deleted file mode 100644
index 38fb15c2c1de8..0000000000000
--- a/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl
+++ /dev/null
@@ -1,31 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <clc/mem_fence/clc_mem_fence.h>
-#include <clc/opencl/synchronization/utils.h>
-
-_CLC_DEF _CLC_OVERLOAD void mem_fence(cl_mem_fence_flags flags) {
- int memory_scope = __MEMORY_SCOPE_WRKGRP;
- int memory_order = __ATOMIC_ACQ_REL;
- __CLC_MemorySemantics memory_semantics = __opencl_get_memory_semantics(flags);
- __clc_mem_fence(memory_scope, memory_order, memory_semantics);
-}
-
-_CLC_DEF _CLC_OVERLOAD void read_mem_fence(cl_mem_fence_flags flags) {
- int memory_scope = __MEMORY_SCOPE_WRKGRP;
- int memory_order = __ATOMIC_ACQUIRE;
- __CLC_MemorySemantics memory_semantics = __opencl_get_memory_semantics(flags);
- __clc_mem_fence(memory_scope, memory_order, memory_semantics);
-}
-
-_CLC_DEF _CLC_OVERLOAD void write_mem_fence(cl_mem_fence_flags flags) {
- int memory_scope = __MEMORY_SCOPE_WRKGRP;
- int memory_order = __ATOMIC_RELEASE;
- __CLC_MemorySemantics memory_semantics = __opencl_get_memory_semantics(flags);
- __clc_mem_fence(memory_scope, memory_order, memory_semantics);
-}
More information about the llvm-branch-commits
mailing list