[all-commits] [llvm/llvm-project] 50f8ab: [OpenCL] Add OpenCL 3.0 atomics to -fdeclare-openc...

Sven van Haastregt via All-commits all-commits at lists.llvm.org
Fri Feb 11 02:14:34 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 50f8abb9f40a6c4974ec71e760773a711732648f
  Author: Sven van Haastregt <sven.vanhaastregt at arm.com>
  Date:   2022-02-11 (Fri, 11 Feb 2022)

  Changed paths:
    M clang/lib/Headers/opencl-c-base.h
    M clang/lib/Sema/OpenCLBuiltins.td
    M clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl

  Log Message:
  [OpenCL] Add OpenCL 3.0 atomics to -fdeclare-opencl-builtins

Add the atomic overloads for the `global` and `local` address spaces,
which are new in OpenCL 3.0.  Ensure the preexisting `generic`
overloads are guarded by the generic address space feature macro.

Ensure a subset of the atomic builtins are guarded by the
`__opencl_c_atomic_order_seq_cst` and `__opencl_c_atomic_scope_device`
feature macros, and enable those macros for SPIR/SPIR-V targets in

Also guard the `cl_ext_float_atomics` builtins with the atomic order
and scope feature macros.

Differential Revision: https://reviews.llvm.org/D119420

More information about the All-commits mailing list