diff --git a/openmp/libomptarget/DeviceRTL/include/Configuration.h b/openmp/libomptarget/DeviceRTL/include/Configuration.h index 45e5cead231f7..c9f8f2500e031 100644 --- a/openmp/libomptarget/DeviceRTL/include/Configuration.h +++ b/openmp/libomptarget/DeviceRTL/include/Configuration.h @@ -13,7 +13,8 @@ #ifndef OMPTARGET_CONFIGURATION_H #define OMPTARGET_CONFIGURATION_H -#include "Environment.h" +#include "Shared/Environment.h" + #include "Types.h" namespace ompx { diff --git a/openmp/libomptarget/DeviceRTL/include/Interface.h b/openmp/libomptarget/DeviceRTL/include/Interface.h index 54c3b3aea93cb..f4854ed3d1678 100644 --- a/openmp/libomptarget/DeviceRTL/include/Interface.h +++ b/openmp/libomptarget/DeviceRTL/include/Interface.h @@ -12,7 +12,8 @@ #ifndef OMPTARGET_DEVICERTL_INTERFACE_H #define OMPTARGET_DEVICERTL_INTERFACE_H -#include "Environment.h" +#include "Shared/Environment.h" + #include "Types.h" /// External API diff --git a/openmp/libomptarget/DeviceRTL/include/State.h b/openmp/libomptarget/DeviceRTL/include/State.h index 1d73bdc4f5409..c93de4191f83f 100644 --- a/openmp/libomptarget/DeviceRTL/include/State.h +++ b/openmp/libomptarget/DeviceRTL/include/State.h @@ -12,8 +12,9 @@ #ifndef OMPTARGET_STATE_H #define OMPTARGET_STATE_H +#include "Shared/Environment.h" + #include "Debug.h" -#include "Environment.h" #include "Mapping.h" #include "Types.h" #include "Utils.h" diff --git a/openmp/libomptarget/DeviceRTL/src/Allocator.cpp b/openmp/libomptarget/DeviceRTL/src/Allocator.cpp index 7a4cbfe60dd02..c9c940de62c1a 100644 --- a/openmp/libomptarget/DeviceRTL/src/Allocator.cpp +++ b/openmp/libomptarget/DeviceRTL/src/Allocator.cpp @@ -8,9 +8,10 @@ // //===----------------------------------------------------------------------===// +#include "Shared/Environment.h" + #include "Allocator.h" #include "Configuration.h" -#include "Environment.h" #include "Mapping.h" #include "Synchronization.h" #include "Types.h" diff --git a/openmp/libomptarget/DeviceRTL/src/Debug.cpp b/openmp/libomptarget/DeviceRTL/src/Debug.cpp index dd627fc65d8f6..aecc33c0497a7 100644 --- a/openmp/libomptarget/DeviceRTL/src/Debug.cpp +++ b/openmp/libomptarget/DeviceRTL/src/Debug.cpp @@ -10,9 +10,10 @@ // //===----------------------------------------------------------------------===// -#include "Debug.h" +#include "Shared/Environment.h" + #include "Configuration.h" -#include "Environment.h" +#include "Debug.h" #include "Interface.h" #include "Mapping.h" #include "State.h" diff --git a/openmp/libomptarget/DeviceRTL/src/Kernel.cpp b/openmp/libomptarget/DeviceRTL/src/Kernel.cpp index f7d8ff8e565c1..06b12fec21677 100644 --- a/openmp/libomptarget/DeviceRTL/src/Kernel.cpp +++ b/openmp/libomptarget/DeviceRTL/src/Kernel.cpp @@ -10,9 +10,10 @@ // //===----------------------------------------------------------------------===// +#include "Shared/Environment.h" + #include "Allocator.h" #include "Debug.h" -#include "Environment.h" #include "Interface.h" #include "Mapping.h" #include "State.h" diff --git a/openmp/libomptarget/DeviceRTL/src/State.cpp b/openmp/libomptarget/DeviceRTL/src/State.cpp index f8a6d333df0d9..40f99e07b44c1 100644 --- a/openmp/libomptarget/DeviceRTL/src/State.cpp +++ b/openmp/libomptarget/DeviceRTL/src/State.cpp @@ -8,14 +8,15 @@ // //===----------------------------------------------------------------------===// -#include "State.h" +#include "Shared/Environment.h" + #include "Allocator.h" #include "Configuration.h" #include "Debug.h" -#include "Environment.h" #include "Interface.h" #include "LibC.h" #include "Mapping.h" +#include "State.h" #include "Synchronization.h" #include "Types.h" #include "Utils.h" diff --git a/openmp/libomptarget/include/Environment.h b/openmp/libomptarget/include/Shared/Environment.h similarity index 94% rename from openmp/libomptarget/include/Environment.h rename to openmp/libomptarget/include/Shared/Environment.h index 3f3dce692f788..d141146b6bd5a 100644 --- a/openmp/libomptarget/include/Environment.h +++ b/openmp/libomptarget/include/Shared/Environment.h @@ -1,4 +1,4 @@ -//===------------ Environment.h - OpenMP GPU environments --------- C++ -*-===// +//===-- Shared/Environment.h - OpenMP GPU environments ------------ C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -10,8 +10,8 @@ // //===----------------------------------------------------------------------===// -#ifndef _OMPTARGET_ENVIRONMENT_H_ -#define _OMPTARGET_ENVIRONMENT_H_ +#ifndef OMPTARGET_SHARED_ENVIRONMENT_H +#define OMPTARGET_SHARED_ENVIRONMENT_H #ifdef OMPTARGET_DEVICE_RUNTIME #include "Types.h" @@ -105,4 +105,4 @@ struct KernelLaunchEnvironmentTy { void *ReductionBuffer = nullptr; }; -#endif // _OMPTARGET_ENVIRONMENT_H_ +#endif // OMPTARGET_SHARED_ENVIRONMENT_H diff --git a/openmp/libomptarget/include/SourceInfo.h b/openmp/libomptarget/include/Shared/SourceInfo.h similarity index 94% rename from openmp/libomptarget/include/SourceInfo.h rename to openmp/libomptarget/include/Shared/SourceInfo.h index d508f6d6bc993..7ce5fd43efc07 100644 --- a/openmp/libomptarget/include/SourceInfo.h +++ b/openmp/libomptarget/include/Shared/SourceInfo.h @@ -1,4 +1,4 @@ -//===------- SourceInfo.h - Target independent OpenMP target RTL -- C++ -*-===// +//===-- SharedSourceInfo.h - Target independent OpenMP target RTL - C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -10,8 +10,8 @@ // //===----------------------------------------------------------------------===// -#ifndef _SOURCE_INFO_H_ -#define _SOURCE_INFO_H_ +#ifndef OMPTARGET_SHARED_SOURCE_INFO_H +#define OMPTARGET_SHARED_SOURCE_INFO_H #include @@ -110,4 +110,4 @@ static inline std::string getNameFromMapping(const map_var_info_t Name) { return NameStr.substr(Begin + 1, End - Begin - 1); } -#endif +#endif // OMPTARGET_SHARED_SOURCE_INFO_H diff --git a/openmp/libomptarget/include/omptarget.h b/openmp/libomptarget/include/omptarget.h index 19e072abc402e..d1c908e37f93b 100644 --- a/openmp/libomptarget/include/omptarget.h +++ b/openmp/libomptarget/include/omptarget.h @@ -14,7 +14,8 @@ #ifndef _OMPTARGET_H_ #define _OMPTARGET_H_ -#include "Environment.h" +#include "Shared/Environment.h" +#include "Shared/SourceInfo.h" #include #include @@ -23,8 +24,6 @@ #include #include -#include - #include "llvm/ADT/SmallVector.h" #define OFFLOAD_SUCCESS (0) diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp index da3d28129fca6..8b2294177016c 100644 --- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp @@ -21,9 +21,9 @@ #include #include "Shared/Debug.h" +#include "Shared/Environment.h" #include "Shared/Utils.h" -#include "Environment.h" #include "GlobalHandler.h" #include "OmptCallback.h" #include "PluginInterface.h" diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp index 277aab1c2f35f..3b0b7de86a926 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp @@ -11,8 +11,8 @@ #include "PluginInterface.h" #include "Shared/Debug.h" +#include "Shared/Environment.h" -#include "Environment.h" #include "GlobalHandler.h" #include "JIT.h" #include "Utils/ELF.h" diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h index 23e2e1efbad80..6abd1b6829ab5 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h @@ -20,9 +20,9 @@ #include #include "Shared/Debug.h" +#include "Shared/Environment.h" #include "Shared/Utils.h" -#include "Environment.h" #include "GlobalHandler.h" #include "JIT.h" #include "MemoryManager.h" diff --git a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp index fc2ef54919ee6..97e49addc5608 100644 --- a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp @@ -17,8 +17,8 @@ #include #include "Shared/Debug.h" +#include "Shared/Environment.h" -#include "Environment.h" #include "GlobalHandler.h" #include "OmptCallback.h" #include "PluginInterface.h" diff --git a/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp index ce5f2f07361f0..c0107c1f14f76 100644 --- a/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp @@ -17,8 +17,8 @@ #include #include "Shared/Debug.h" +#include "Shared/Environment.h" -#include "Environment.h" #include "GlobalHandler.h" #include "OmptCallback.h" #include "PluginInterface.h" diff --git a/openmp/libomptarget/src/private.h b/openmp/libomptarget/src/private.h index 87ffe2d43dd75..37dae0a9f6bea 100644 --- a/openmp/libomptarget/src/private.h +++ b/openmp/libomptarget/src/private.h @@ -14,8 +14,8 @@ #define _OMPTARGET_PRIVATE_H #include "Shared/Debug.h" +#include "Shared/SourceInfo.h" -#include "SourceInfo.h" #include "device.h" #include "omptarget.h"