[libomptarget] Move device environment to shared header, remove divergence
authorJon Chesterfield <jonathanchesterfield@gmail.com>
Thu, 7 Oct 2021 11:03:46 +0000 (12:03 +0100)
committerJon Chesterfield <jonathanchesterfield@gmail.com>
Thu, 7 Oct 2021 11:03:48 +0000 (12:03 +0100)
commit0c554a4769f2e21233b687c7427c1a47f7bd375e
tree05a91f52863f838a62cddd55b5d7b6a93b09577d
parentb7ac68d01ef9a126ea0eb26b3526a78c9d39533a
[libomptarget] Move device environment to shared header, remove divergence

Follow on to D110006, related to D110957

Where implementations have diverged this resolves to match the new DeviceRTL

- replaces definitions of this struct in deviceRTL and plugins with include
- changes the dynamic_shared_size field from D110006 to 32 bits
- handles stdint being unavailable in DeviceRTL
- adds a zero initializer for the field to amdgpu
- moves the extern declaration for deviceRTL to target_interface
  (omptarget.h is more natural, but doesn't work due to include order
  with debug.h)
- Renames the fields everywhere to match the LLVM format used in DeviceRTL
- Makes debug_level uint32_t everywhere (previously sometimes int32_t)

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D111069
openmp/libomptarget/DeviceRTL/CMakeLists.txt
openmp/libomptarget/DeviceRTL/src/Configuration.cpp
openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
openmp/libomptarget/deviceRTLs/common/debug.h
openmp/libomptarget/deviceRTLs/common/src/omp_data.cu
openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
openmp/libomptarget/deviceRTLs/target_interface.h
openmp/libomptarget/include/DeviceEnvironment.h [moved from openmp/libomptarget/deviceRTLs/common/device_environment.h with 71% similarity]
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
openmp/libomptarget/plugins/cuda/src/rtl.cpp