diff options
author | Johannes Doerfert <johannes@jdoerfert.de> | 2023-11-28 15:10:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-28 15:10:06 -0800 |
commit | 7233e42dff7f819d76baeb67781648718828e026 (patch) | |
tree | 9b51af4ef77a8ae7e53e3df1a2e6e01f8cd5f05a | |
parent | 1a041a3ad8a0104da70202e68256513de8848dbf (diff) |
[OpenMP][NFC] Move Environment.h and SourceInfo.h into "Shared" folder (#73703)
16 files changed, 32 insertions, 26 deletions
diff --git a/openmp/libomptarget/DeviceRTL/include/Configuration.h b/openmp/libomptarget/DeviceRTL/include/Configuration.h index 45e5cead231f..c9f8f2500e03 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 54c3b3aea93c..f4854ed3d167 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 1d73bdc4f540..c93de4191f83 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 7a4cbfe60dd0..c9c940de62c1 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 dd627fc65d8f..aecc33c0497a 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 f7d8ff8e565c..06b12fec2167 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 f8a6d333df0d..40f99e07b44c 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 index 3f3dce692f78..d141146b6bd5 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 index d508f6d6bc99..7ce5fd43efc0 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 <string> @@ -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 19e072abc402..d1c908e37f93 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 <cstdint> #include <deque> @@ -23,8 +24,6 @@ #include <stdint.h> #include <type_traits> -#include <SourceInfo.h> - #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 da3d28129fca..8b2294177016 100644 --- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp @@ -21,9 +21,9 @@ #include <unordered_map> #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 277aab1c2f35..3b0b7de86a92 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 23e2e1efbad8..6abd1b6829ab 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h @@ -20,9 +20,9 @@ #include <vector> #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 fc2ef54919ee..97e49addc560 100644 --- a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp @@ -17,8 +17,8 @@ #include <unordered_map> #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 ce5f2f07361f..c0107c1f14f7 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 <unordered_map> #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 87ffe2d43dd7..37dae0a9f6be 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" |