[all-commits] [llvm/llvm-project] 6e8d93: [Libomptarget] Implement OpenMP 5.2 semantics for ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Sep 7 15:01:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e8d93e5c2351efcf3f6fd658af642b027da3bc4
      https://github.com/llvm/llvm-project/commit/6e8d93e5c2351efcf3f6fd658af642b027da3bc4
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-09-07 (Wed, 07 Sep 2022)

  Changed paths:
    M openmp/libomptarget/include/device.h
    M openmp/libomptarget/src/api.cpp
    M openmp/libomptarget/src/device.cpp
    M openmp/libomptarget/src/omptarget.cpp
    A openmp/libomptarget/test/mapping/implicit_device_ptr.c

  Log Message:
  -----------
  [Libomptarget] Implement OpenMP 5.2 semantics for device pointers

In OpenMP 5.2, ยง5.8.6, page 160 line 32-33, when a device pointer
allocated by omp_target_alloc has implicitly been included on a target
construct as a zero-length array, the pointer initialisation should not
find a matching mapped list item, and so should retain its value as a
firstprivate variable. Previously, we would return a null pointer if the
list item was not found. This patch updates the map handling to the
OpenMP 5.2 semantics.

Reviewed By: jdoerfert, ye-luo

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




More information about the All-commits mailing list