[all-commits] [llvm/llvm-project] 19248d: [OpenMP][deviceRTLs] Added `[[clang::loader_uninit...

Shilei Tian via All-commits all-commits at lists.llvm.org
Thu Jan 28 05:13:10 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 19248d30e4ed5250fa84abbbd52fc7b835918a45
      https://github.com/llvm/llvm-project/commit/19248d30e4ed5250fa84abbbd52fc7b835918a45
  Author: Shilei Tian <tianshilei1992 at gmail.com>
  Date:   2021-01-28 (Thu, 28 Jan 2021)

  Changed paths:
    M openmp/libomptarget/deviceRTLs/common/src/omp_data.cu

  Log Message:
  -----------
  [OpenMP][deviceRTLs] Added `[[clang::loader_uninitialized]]` explicitly

`[[clang::loader_uninitialized]]` is in macro `SHARED` but it doesn't
work for array like `parallelLevel`, so the variable will be zero initialized.
There is also a similar issue for `omptarget_nvptx_device_State` which is in
global address space. Its c'tor is also generated, which was not in the past when
building the `deviceRTLs` with CUDA. In this patch, we added the attribute to
the two variables explicitly.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list