[libclc] [libclc] Move mem_fence and barrier to clc library (PR #151446)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 5 03:55:28 PDT 2025
================
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __CLC_MEM_FENCE_CLC_MEM_SCOPE_SEMANTICS_H__
+#define __CLC_MEM_FENCE_CLC_MEM_SCOPE_SEMANTICS_H__
+
+// Scope values are defined in SPIR-V spec.
+typedef enum Scope {
----------------
wenju-he wrote:
> Should stick to OpenCL spec and terminology; I thought clang already had predefined enums for both of these
done, thanks @arsenm
Changed to use clang macro __MEMORY_SCOPE_DEVICE/__MEMORY_SCOPE_WRKGRP and __ATOMIC_SEQ_CST
https://github.com/llvm/llvm-project/pull/151446
More information about the cfe-commits
mailing list