[OpenMP][deviceRTLs] Added `[[clang::loader_uninitialized]]` explicitly
authorShilei Tian <tianshilei1992@gmail.com>
Thu, 28 Jan 2021 13:12:39 +0000 (08:12 -0500)
committerShilei Tian <tianshilei1992@gmail.com>
Thu, 28 Jan 2021 13:12:49 +0000 (08:12 -0500)
commit19248d30e4ed5250fa84abbbd52fc7b835918a45
treead0351a2d6bd8f90dcb21877c9f98f6616f23839
parent40f46cb0e4301b343d99771188e6bbad01c83c62
[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
openmp/libomptarget/deviceRTLs/common/src/omp_data.cu