diff --git a/openmp/libomptarget/include/OmptConnector.h b/openmp/libomptarget/include/OmptConnector.h index 75473b8dda486..3f48cabfba554 100644 --- a/openmp/libomptarget/include/OmptConnector.h +++ b/openmp/libomptarget/include/OmptConnector.h @@ -23,10 +23,10 @@ #include #include "omp-tools.h" - -#include "Debug.h" #include "omptarget.h" +#include "Shared/Debug.h" + #pragma push_macro("DEBUG_PREFIX") #undef DEBUG_PREFIX #define DEBUG_PREFIX "OMPT" diff --git a/openmp/libomptarget/include/Debug.h b/openmp/libomptarget/include/Shared/Debug.h similarity index 97% rename from openmp/libomptarget/include/Debug.h rename to openmp/libomptarget/include/Shared/Debug.h index 17aa8746afe7c..9f8818429c779 100644 --- a/openmp/libomptarget/include/Debug.h +++ b/openmp/libomptarget/include/Shared/Debug.h @@ -1,4 +1,4 @@ -//===------- Debug.h - Target independent OpenMP target RTL -- C++ --------===// +//===-- Shared/Debug.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. @@ -34,8 +34,9 @@ // (uintptr_t) ptr); // //===----------------------------------------------------------------------===// -#ifndef _OMPTARGET_DEBUG_H -#define _OMPTARGET_DEBUG_H + +#ifndef OMPTARGET_SHARED_DEBUG_H +#define OMPTARGET_SHARED_DEBUG_H #include #include @@ -185,4 +186,4 @@ inline uint32_t getDebugLevel() { } \ } while (false) -#endif // _OMPTARGET_DEBUG_H +#endif // OMPTARGET_SHARED_DEBUG_H diff --git a/openmp/libomptarget/include/Utilities.h b/openmp/libomptarget/include/Shared/Utils.h similarity index 97% rename from openmp/libomptarget/include/Utilities.h rename to openmp/libomptarget/include/Shared/Utils.h index 84d38d05911f7..b6bb97ce59496 100644 --- a/openmp/libomptarget/include/Utilities.h +++ b/openmp/libomptarget/include/Shared/Utils.h @@ -1,4 +1,4 @@ -//===------- Utilities.h - Target independent OpenMP target RTL -- C++ ----===// +//===-- Shared/Utils.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. @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef OPENMP_LIBOMPTARGET_INCLUDE_UTILITIES_H -#define OPENMP_LIBOMPTARGET_INCLUDE_UTILITIES_H +#ifndef OMPTARGET_SHARED_UTILS_H +#define OMPTARGET_SHARED_UTILS_H #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" @@ -262,4 +262,4 @@ template inline Ty roundUp(Ty V, Ty Boundary) { } // namespace omp } // namespace llvm -#endif // OPENMP_LIBOMPTARGET_INCLUDE_UTILITIES_H +#endif // OMPTARGET_SHARED_UTILS_H diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa.cpp index 8f73a03cfeebb..faeb4ea77d6d4 100644 --- a/openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa.cpp +++ b/openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa.cpp @@ -13,7 +13,8 @@ #include "llvm/Support/DynamicLibrary.h" -#include "Debug.h" +#include "Shared/Debug.h" + #include "dlwrap.h" #include "hsa.h" #include "hsa_ext_amd.h" diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp index 208cce90d8e92..da3d28129fca6 100644 --- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp @@ -20,12 +20,13 @@ #include #include -#include "Debug.h" +#include "Shared/Debug.h" +#include "Shared/Utils.h" + #include "Environment.h" #include "GlobalHandler.h" #include "OmptCallback.h" #include "PluginInterface.h" -#include "Utilities.h" #include "UtilitiesRTL.h" #include "omptarget.h" diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h b/openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h index b39545ab7d02b..289dbf8e3d09d 100644 --- a/openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h +++ b/openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h @@ -12,7 +12,8 @@ #include -#include "Debug.h" +#include "Shared/Debug.h" + #include "omptarget.h" #include "llvm/ADT/StringMap.h" @@ -23,8 +24,8 @@ #include "llvm/BinaryFormat/ELF.h" #include "llvm/BinaryFormat/MsgPackDocument.h" #include "llvm/Support/MemoryBufferRef.h" - #include "llvm/Support/YAMLTraits.h" + using namespace llvm::ELF; namespace llvm { diff --git a/openmp/libomptarget/plugins-nextgen/common/OMPT/OmptCallback.cpp b/openmp/libomptarget/plugins-nextgen/common/OMPT/OmptCallback.cpp index 7d719156c49b8..b778b7287c7bc 100644 --- a/openmp/libomptarget/plugins-nextgen/common/OMPT/OmptCallback.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/OMPT/OmptCallback.cpp @@ -18,7 +18,8 @@ #include #include -#include "Debug.h" +#include "Shared/Debug.h" + #include "OmptCallback.h" #include "OmptConnector.h" diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.cpp index 9cb1da371fa9a..6cb9a366f8b2c 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.cpp @@ -12,9 +12,10 @@ #include "GlobalHandler.h" #include "PluginInterface.h" -#include "Utilities.h" #include "Utils/ELF.h" +#include "Shared/Utils.h" + #include using namespace llvm; diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.h b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.h index c92e0d549c1bd..aff10b1d504fc 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.h +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.h @@ -18,8 +18,9 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/Object/ELFObjectFile.h" -#include "Debug.h" -#include "Utilities.h" +#include "Shared/Debug.h" +#include "Shared/Utils.h" + #include "omptarget.h" namespace llvm { diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp index 3def95ee49205..188fb6dac84b9 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp @@ -9,10 +9,11 @@ //===----------------------------------------------------------------------===// #include "JIT.h" -#include "Debug.h" + +#include "Shared/Debug.h" +#include "Shared/Utils.h" #include "PluginInterface.h" -#include "Utilities.h" #include "omptarget.h" #include "llvm/ADT/SmallVector.h" diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.h b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.h index 100c279e863df..1a5e56b2ea732 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.h +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.h @@ -11,7 +11,7 @@ #ifndef OPENMP_LIBOMPTARGET_PLUGINS_NEXTGEN_COMMON_JIT_H #define OPENMP_LIBOMPTARGET_PLUGINS_NEXTGEN_COMMON_JIT_H -#include "Utilities.h" +#include "Shared/Utils.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/MemoryManager.h b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/MemoryManager.h index 2d23d959f6c0b..95491b4be6fa6 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/MemoryManager.h +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/MemoryManager.h @@ -21,8 +21,8 @@ #include #include -#include "Debug.h" -#include "Utilities.h" +#include "Shared/Debug.h" +#include "Shared/Utils.h" #include "omptarget.h" /// Base class of per-device allocator. diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp index 2ee79d3131ff3..277aab1c2f35f 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp @@ -9,7 +9,9 @@ //===----------------------------------------------------------------------===// #include "PluginInterface.h" -#include "Debug.h" + +#include "Shared/Debug.h" + #include "Environment.h" #include "GlobalHandler.h" #include "JIT.h" diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h index 0093bef571f93..23e2e1efbad80 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h @@ -19,13 +19,14 @@ #include #include -#include "Debug.h" +#include "Shared/Debug.h" +#include "Shared/Utils.h" + #include "Environment.h" #include "GlobalHandler.h" #include "JIT.h" #include "MemoryManager.h" #include "RPC.h" -#include "Utilities.h" #include "omptarget.h" #ifdef OMPT_SUPPORT diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/RPC.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/RPC.cpp index 72bba012fcf93..a40bf147b2248 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/RPC.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/RPC.cpp @@ -7,7 +7,9 @@ //===----------------------------------------------------------------------===// #include "RPC.h" -#include "Debug.h" + +#include "Shared/Debug.h" + #include "PluginInterface.h" // This header file may be present in-tree or from an LLVM installation. The diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/Utils/ELF.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/Utils/ELF.cpp index e0c46e4a288e9..7089e26754aa5 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/Utils/ELF.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/Utils/ELF.cpp @@ -11,7 +11,8 @@ //===----------------------------------------------------------------------===// #include "ELF.h" -#include "Debug.h" + +#include "Shared/Debug.h" #include "llvm/BinaryFormat/Magic.h" #include "llvm/Object/Binary.h" diff --git a/openmp/libomptarget/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp b/openmp/libomptarget/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp index 3d0de0d5b2caf..f99dc780c38e4 100644 --- a/openmp/libomptarget/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp +++ b/openmp/libomptarget/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp @@ -13,7 +13,8 @@ #include "llvm/Support/DynamicLibrary.h" -#include "Debug.h" +#include "Shared/Debug.h" + #include "cuda.h" #include "dlwrap.h" diff --git a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp index d1473c94af8a6..fc2ef54919ee6 100644 --- a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp @@ -16,7 +16,8 @@ #include #include -#include "Debug.h" +#include "Shared/Debug.h" + #include "Environment.h" #include "GlobalHandler.h" #include "OmptCallback.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 85cf9bef1543b..ce5f2f07361f0 100644 --- a/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp @@ -16,7 +16,8 @@ #include #include -#include "Debug.h" +#include "Shared/Debug.h" + #include "Environment.h" #include "GlobalHandler.h" #include "OmptCallback.h" diff --git a/openmp/libomptarget/src/OmptCallback.cpp b/openmp/libomptarget/src/OmptCallback.cpp index 4882a762adbf6..983939090df2e 100644 --- a/openmp/libomptarget/src/OmptCallback.cpp +++ b/openmp/libomptarget/src/OmptCallback.cpp @@ -18,7 +18,8 @@ #include #include -#include "Debug.h" +#include "Shared/Debug.h" + #include "OmptCallback.h" #include "OmptConnector.h" #include "OmptInterface.h" diff --git a/openmp/libomptarget/src/device.cpp b/openmp/libomptarget/src/device.cpp index 11465d0b2cc3c..87ee480825217 100644 --- a/openmp/libomptarget/src/device.cpp +++ b/openmp/libomptarget/src/device.cpp @@ -17,7 +17,7 @@ #include "private.h" #include "rtl.h" -#include "Utilities.h" +#include "Shared/Utils.h" #include #include diff --git a/openmp/libomptarget/src/interface.cpp b/openmp/libomptarget/src/interface.cpp index 79f38ed1a4343..4735469b55aa0 100644 --- a/openmp/libomptarget/src/interface.cpp +++ b/openmp/libomptarget/src/interface.cpp @@ -18,7 +18,7 @@ #include "private.h" #include "rtl.h" -#include "Utilities.h" +#include "Shared/Utils.h" #include #include diff --git a/openmp/libomptarget/src/private.h b/openmp/libomptarget/src/private.h index 3eb500cbd4c97..87ffe2d43dd75 100644 --- a/openmp/libomptarget/src/private.h +++ b/openmp/libomptarget/src/private.h @@ -13,10 +13,11 @@ #ifndef _OMPTARGET_PRIVATE_H #define _OMPTARGET_PRIVATE_H +#include "Shared/Debug.h" + +#include "SourceInfo.h" #include "device.h" -#include -#include -#include +#include "omptarget.h" #include diff --git a/openmp/libomptarget/src/rtl.cpp b/openmp/libomptarget/src/rtl.cpp index 78076dd2c6db1..86509cd69c561 100644 --- a/openmp/libomptarget/src/rtl.cpp +++ b/openmp/libomptarget/src/rtl.cpp @@ -17,7 +17,7 @@ #include "private.h" #include "rtl.h" -#include "Utilities.h" +#include "Shared/Utils.h" #include #include