diff options
author | Wenju He <wenju.he@intel.com> | 2025-07-18 08:09:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-18 08:09:14 +0800 |
commit | 9c26f37ce34de3be3550cbd67fcea534721724fd (patch) | |
tree | f3e49a7f0cf17098676c3bb226bb0e98a4554642 /llvm/lib/CodeGen/MachineFunctionAnalysis.cpp | |
parent | 64205adc3bfdaab0f35f7909de59dadd20ef6e6a (diff) | |
download | llvm-9c26f37ce34de3be3550cbd67fcea534721724fd.zip llvm-9c26f37ce34de3be3550cbd67fcea534721724fd.tar.gz llvm-9c26f37ce34de3be3550cbd67fcea534721724fd.tar.bz2 |
[libclc] Add generic implementation of some atomic functions in OpenCL spec section 6.15.12.7 (#146814)
Add corresponding clc functions, which are implemented with clang
__scoped_atomic builtins. OpenCL functions are implemented as a wrapper
over clc functions.
Also change legacy atomic_inc and atomic_dec to re-use the newly added
clc_atomic_inc/dec implementations. llvm-diff only no change to
atomic_inc and atomic_dec in bitcode.
Notes:
* Generic OpenCL built-ins functions uses __ATOMIC_SEQ_CST and
__MEMORY_SCOPE_DEVICE for memory order and memory scope parameters.
* OpenCL atomic_*_explicit, atomic_flag* built-ins are not implemented
yet.
* OpenCL built-ins of atomic_intptr_t, atomic_uintptr_t, atomic_size_t
and atomic_ptrdiff_t types are not implemented yet.
* llvm-diff shows no change to nvptx64--nvidiacl.bc and
amdgcn--amdhsa.bc since __opencl_c_atomic_order_seq_cst and
__opencl_c_atomic_scope_device are not defined in these two targets.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions