[PATCH] D108392: [OpenCL] Fix parsing of opencl-c.h in CL 3.0 with device-scope atomics enabled
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 25 02:53:26 PDT 2021
Anastasia added a subscriber: azabaznov.
Anastasia added inline comments.
================
Comment at: clang/include/clang/Basic/OpenCLExtensions.def:113
OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_order_seq_cst, false, 300, OCL_C_30)
+OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_scope_device, false, 300, OCL_C_30)
+OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_scope_all_devices, false, 300, OCL_C_30)
----------------
Do we need to add anything to clang for those features? If not they should just go into the headers, see guidelines https://clang.llvm.org/docs/OpenCLSupport.html#implementation-guidelines
CC @azabaznov
================
Comment at: clang/lib/Headers/opencl-c.h:13381
uint __ovld atomic_fetch_xor(volatile __global atomic_uint *object, uint operand);
-uint __ovld atomic_fetch_xor(volatile __local atomic_uint *object, uint operand);i
int __ovld atomic_fetch_and(volatile __global atomic_int *object, int operand);
----------------
This is a fairly trivial fix. You can just commit it straight away if you like. :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108392/new/
https://reviews.llvm.org/D108392
More information about the cfe-commits
mailing list