[all-commits] [llvm/llvm-project] d54e7b: [OpenCL] Add memory_scope_all_devices

Sven van Haastregt via All-commits all-commits at lists.llvm.org
Tue Jun 8 04:01:30 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d54e7b731e662e3ec19c590172c9827e3e184829
      https://github.com/llvm/llvm-project/commit/d54e7b731e662e3ec19c590172c9827e3e184829
  Author: Sven van Haastregt <sven.vanhaastregt at arm.com>
  Date:   2021-06-08 (Tue, 08 Jun 2021)

  Changed paths:
    M clang/lib/Headers/opencl-c-base.h
    M clang/test/Headers/opencl-c-header.cl
    M clang/test/SemaOpenCL/atomic-ops.cl

  Log Message:
  -----------
  [OpenCL] Add memory_scope_all_devices

Add the `memory_scope_all_devices` enum value, which is restricted to
OpenCL 3.0 or newer and the `__opencl_c_atomic_scope_all_devices`
feature.  Also guard `memory_scope_all_svm_devices` accordingly, which
is already available in OpenCL 2.0.

The `__opencl_c_atomic_scope_all_devices` feature is header-only, so
set its define to 1 in `opencl-c-base.h`.  This is done
unconditionally at the moment, as the mechanism for disabling
header-only options hasn't been decided yet.

This patch only adds a negative test for now.  Ideally adding a CL3.0
run line to atomic-ops.cl should suffice as a positive test, but we
cannot do that yet until (at least) generic address spaces and program
scope variables are supported in OpenCL 3.0 mode.

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




More information about the All-commits mailing list