[OpenMP] Fix initializer not working on AMDGPU
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 16 Nov 2021 04:04:55 +0000 (23:04 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 16 Nov 2021 13:17:15 +0000 (08:17 -0500)
commit374cd0fb6102a8726da0e6036b3c484aca32c61e
tree7262e567494b6e91c50864537631ba698b692291
parentd2da1a2f400ab54a874c1ba5430adc07a5249563
[OpenMP] Fix initializer not working on AMDGPU

The RAII class used for debugging RTL entry used a shared variable to
keep track of the current depth. This used a global initializer, which
isn't supported on AMDGPU. This patch removes the initializer and
instead sets it to zero when the state is initialized in the runtime.

Reviewed By: jdoerfert, JonChesterfield

Differential Revision: https://reviews.llvm.org/D113963
openmp/libomptarget/DeviceRTL/include/Debug.h
openmp/libomptarget/DeviceRTL/src/Debug.cpp
openmp/libomptarget/DeviceRTL/src/State.cpp