[Openmp-commits] [openmp] [OpenMP][NFC] Move OMPT headers into OpenMP/OMPT (PR #73718)

via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 28 15:47:20 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-openmp

Author: Johannes Doerfert (jdoerfert)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/73718.diff


13 Files Affected:

- (renamed) openmp/libomptarget/include/OpenMP/OMPT/Callback.h (+4-4) 
- (renamed) openmp/libomptarget/include/OpenMP/OMPT/Connector.h (+4-4) 
- (renamed) openmp/libomptarget/include/OpenMP/OMPT/Interface.h (+5-5) 
- (modified) openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp (+1-1) 
- (modified) openmp/libomptarget/plugins-nextgen/common/OMPT/OmptCallback.cpp (+2-2) 
- (modified) openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp (+1-1) 
- (modified) openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp (+1-1) 
- (modified) openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp (+1-1) 
- (modified) openmp/libomptarget/src/OmptCallback.cpp (+3-3) 
- (modified) openmp/libomptarget/src/device.cpp (+2-2) 
- (modified) openmp/libomptarget/src/interface.cpp (+2-2) 
- (modified) openmp/libomptarget/src/omptarget.cpp (+2-2) 
- (modified) openmp/libomptarget/src/rtl.cpp (+1-1) 


``````````diff
diff --git a/openmp/libomptarget/include/OmptCallback.h b/openmp/libomptarget/include/OpenMP/OMPT/Callback.h
similarity index 95%
rename from openmp/libomptarget/include/OmptCallback.h
rename to openmp/libomptarget/include/OpenMP/OMPT/Callback.h
index ca4e73670daea5e..89c5731221e973a 100644
--- a/openmp/libomptarget/include/OmptCallback.h
+++ b/openmp/libomptarget/include/OpenMP/OMPT/Callback.h
@@ -1,4 +1,4 @@
-//===---- OmptCallback.h - Target independent OMPT callbacks --*- C++ -*---===//
+//===-- OpenMP/OMPT/Callback.h - OpenMP Tooling callbacks -------*- 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 _OMPTCALLBACK_H
-#define _OMPTCALLBACK_H
+#ifndef OMPTARGET_OPENMP_OMPT_CALLBACK_H
+#define OMPTARGET_OPENMP_OMPT_CALLBACK_H
 
 #ifdef OMPT_SUPPORT
 
@@ -102,4 +102,4 @@ extern bool Initialized;
 #define performIfOmptInitialized(stmt)
 #endif // OMPT_SUPPORT
 
-#endif // _OMPTCALLBACK_H
+#endif // OMPTARGET_OPENMP_OMPT_CALLBACK_H
diff --git a/openmp/libomptarget/include/OmptConnector.h b/openmp/libomptarget/include/OpenMP/OMPT/Connector.h
similarity index 94%
rename from openmp/libomptarget/include/OmptConnector.h
rename to openmp/libomptarget/include/OpenMP/OMPT/Connector.h
index 3f48cabfba55441..c7b37740d564219 100644
--- a/openmp/libomptarget/include/OmptConnector.h
+++ b/openmp/libomptarget/include/OpenMP/OMPT/Connector.h
@@ -1,4 +1,4 @@
-//===- OmptConnector.h - Target independent OpenMP target RTL -- C++ ------===//
+//===-- OpenMP/OMPT/Connector.h - OpenMP Tooling lib connector -*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -12,8 +12,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _OMPTCONNECTOR_H
-#define _OMPTCONNECTOR_H
+#ifndef OMPTARGET_OPENMP_OMPT_CONNECTOR_H
+#define OMPTARGET_OPENMP_OMPT_CONNECTOR_H
 
 #ifdef OMPT_SUPPORT
 
@@ -106,4 +106,4 @@ class OmptLibraryConnectorTy {
 
 #pragma pop_macro("DEBUG_PREFIX")
 
-#endif // _OMPTCONNECTOR_H
+#endif // OMPTARGET_OPENMP_OMPT_CONNECTOR_H
diff --git a/openmp/libomptarget/src/OmptInterface.h b/openmp/libomptarget/include/OpenMP/OMPT/Interface.h
similarity index 97%
rename from openmp/libomptarget/src/OmptInterface.h
rename to openmp/libomptarget/include/OpenMP/OMPT/Interface.h
index 178cedacf4a5860..d68273dc9d41e47 100644
--- a/openmp/libomptarget/src/OmptInterface.h
+++ b/openmp/libomptarget/include/OpenMP/OMPT/Interface.h
@@ -1,4 +1,4 @@
-//===-------- OmptInterface.h - Target independent OpenMP target RTL ------===//
+//===-- OpenMP/OMPT/Interface.h - OpenMP Tooling interfaces ----*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// Declarations for OpenMP Tool callback dispatchers
+// Declarations for OpenMP Tool callback dispatchers.
 //
 //===----------------------------------------------------------------------===//
 
@@ -18,7 +18,7 @@
 #include <functional>
 #include <tuple>
 
-#include "OmptCallback.h"
+#include "Callback.h"
 #include "omp-tools.h"
 
 #include "llvm/Support/ErrorHandling.h"
@@ -249,8 +249,8 @@ template <typename CallbackPairTy, typename... ArgsTy> class InterfaceRAII {
 
 // InterfaceRAII's class template argument deduction guide
 template <typename CallbackPairTy, typename... ArgsTy>
-InterfaceRAII(CallbackPairTy Callbacks, ArgsTy... Args)
-    -> InterfaceRAII<CallbackPairTy, ArgsTy...>;
+InterfaceRAII(CallbackPairTy Callbacks,
+              ArgsTy... Args) -> InterfaceRAII<CallbackPairTy, ArgsTy...>;
 
 } // namespace ompt
 } // namespace target
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index 8b2294177016cda..3d797bab82a6fae 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -25,7 +25,7 @@
 #include "Shared/Utils.h"
 
 #include "GlobalHandler.h"
-#include "OmptCallback.h"
+#include "OpenMP/OMPT/Callback.h"
 #include "PluginInterface.h"
 #include "UtilitiesRTL.h"
 #include "omptarget.h"
diff --git a/openmp/libomptarget/plugins-nextgen/common/OMPT/OmptCallback.cpp b/openmp/libomptarget/plugins-nextgen/common/OMPT/OmptCallback.cpp
index b778b7287c7bc56..fb8a156fe5767a2 100644
--- a/openmp/libomptarget/plugins-nextgen/common/OMPT/OmptCallback.cpp
+++ b/openmp/libomptarget/plugins-nextgen/common/OMPT/OmptCallback.cpp
@@ -20,8 +20,8 @@
 
 #include "Shared/Debug.h"
 
-#include "OmptCallback.h"
-#include "OmptConnector.h"
+#include "OpenMP/OMPT/Callback.h"
+#include "OpenMP/OMPT/Connector.h"
 
 using namespace llvm::omp::target::ompt;
 
diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
index 3b0b7de86a926ec..477e0cad06fd50a 100644
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
@@ -20,7 +20,7 @@
 #include "omptargetplugin.h"
 
 #ifdef OMPT_SUPPORT
-#include "OmptCallback.h"
+#include "OpenMP/OMPT/Callback.h"
 #include "omp-tools.h"
 #endif
 
diff --git a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
index 97e49addc5608cb..698517179e4cdb7 100644
--- a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
@@ -20,7 +20,7 @@
 #include "Shared/Environment.h"
 
 #include "GlobalHandler.h"
-#include "OmptCallback.h"
+#include "OpenMP/OMPT/Callback.h"
 #include "PluginInterface.h"
 
 #include "llvm/BinaryFormat/ELF.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 c0107c1f14f76fb..e1706cfb2cbf1ef 100644
--- a/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp
@@ -20,7 +20,7 @@
 #include "Shared/Environment.h"
 
 #include "GlobalHandler.h"
-#include "OmptCallback.h"
+#include "OpenMP/OMPT/Callback.h"
 #include "PluginInterface.h"
 #include "omptarget.h"
 
diff --git a/openmp/libomptarget/src/OmptCallback.cpp b/openmp/libomptarget/src/OmptCallback.cpp
index 983939090df2e7e..a45d1a0f282ac02 100644
--- a/openmp/libomptarget/src/OmptCallback.cpp
+++ b/openmp/libomptarget/src/OmptCallback.cpp
@@ -20,9 +20,9 @@
 
 #include "Shared/Debug.h"
 
-#include "OmptCallback.h"
-#include "OmptConnector.h"
-#include "OmptInterface.h"
+#include "OpenMP/OMPT/Callback.h"
+#include "OpenMP/OMPT/Connector.h"
+#include "OpenMP/OMPT/Interface.h"
 
 #undef DEBUG_PREFIX
 #define DEBUG_PREFIX "OMPT"
diff --git a/openmp/libomptarget/src/device.cpp b/openmp/libomptarget/src/device.cpp
index 87ee48082521712..742ab156da31775 100644
--- a/openmp/libomptarget/src/device.cpp
+++ b/openmp/libomptarget/src/device.cpp
@@ -11,8 +11,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "device.h"
-#include "OmptCallback.h"
-#include "OmptInterface.h"
+#include "OpenMP/OMPT/Callback.h"
+#include "OpenMP/OMPT/Interface.h"
 #include "omptarget.h"
 #include "private.h"
 #include "rtl.h"
diff --git a/openmp/libomptarget/src/interface.cpp b/openmp/libomptarget/src/interface.cpp
index 4735469b55aa055..ae9fdf9228888c6 100644
--- a/openmp/libomptarget/src/interface.cpp
+++ b/openmp/libomptarget/src/interface.cpp
@@ -11,8 +11,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "OmptCallback.h"
-#include "OmptInterface.h"
+#include "OpenMP/OMPT/Interface.h"
+#include "OpenMP/OMPT/Callback.h"
 #include "device.h"
 #include "omptarget.h"
 #include "private.h"
diff --git a/openmp/libomptarget/src/omptarget.cpp b/openmp/libomptarget/src/omptarget.cpp
index d3b299ca58f5172..dc389f2fef2e0ba 100644
--- a/openmp/libomptarget/src/omptarget.cpp
+++ b/openmp/libomptarget/src/omptarget.cpp
@@ -12,8 +12,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "omptarget.h"
-#include "OmptCallback.h"
-#include "OmptInterface.h"
+#include "OpenMP/OMPT/Callback.h"
+#include "OpenMP/OMPT/Interface.h"
 #include "device.h"
 #include "private.h"
 #include "rtl.h"
diff --git a/openmp/libomptarget/src/rtl.cpp b/openmp/libomptarget/src/rtl.cpp
index 86509cd69c5614f..5baef924a1d1818 100644
--- a/openmp/libomptarget/src/rtl.cpp
+++ b/openmp/libomptarget/src/rtl.cpp
@@ -12,7 +12,7 @@
 
 #include "llvm/Object/OffloadBinary.h"
 
-#include "OmptCallback.h"
+#include "OpenMP/OMPT/Callback.h"
 #include "device.h"
 #include "private.h"
 #include "rtl.h"

``````````

</details>


https://github.com/llvm/llvm-project/pull/73718


More information about the Openmp-commits mailing list