diff options
author | Wenju He <wenju.he@intel.com> | 2025-08-06 09:49:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-06 09:49:28 +0800 |
commit | af16fc2e2a50c1cbac49726ea70739ad6e193729 (patch) | |
tree | ffd5cf44d190efa27091ca77d0571ecde4f3dbc3 /clang/unittests/Basic/VirtualFileSystemTest.cpp | |
parent | a15b629527a975ec592c95d69d04ef3537915d1d (diff) | |
download | llvm-af16fc2e2a50c1cbac49726ea70739ad6e193729.zip llvm-af16fc2e2a50c1cbac49726ea70739ad6e193729.tar.gz llvm-af16fc2e2a50c1cbac49726ea70739ad6e193729.tar.bz2 |
[libclc] Move mem_fence and barrier to clc library (#151446)
__clc_mem_fence and __clc_work_group_barrier function have two
parameters memory_scope and memory_order. The design allows the clc
functions to implement SPIR-V ControlBarrier and MemoryBarrier
functions in the future.
The default memory ordering in clc is set to __ATOMIC_SEQ_CST, which is
also the default and strongest ordering in OpenCL and C++.
OpenCL cl_mem_fence_flags parameter is converted to combination of
__MEMORY_SCOPE_DEVICE and __MEMORY_SCOPE_WRKGRP, which is passed to clc.
llvm-diff shows no change to nvptx64--nvidiacl.bc.
llvm-diff show a small change to amdgcn--amdhsa.bc and the number of
LLVM IR instruction is reduced by 1: https://alive2.llvm.org/ce/z/_Uhqvt
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions