-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OpenMP][NFC] Move OMPT headers into OpenMP/OMPT #73718
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-backend-amdgpu @llvm/pr-subscribers-openmp Author: Johannes Doerfert (jdoerfert) ChangesFull diff: https://github.com/llvm/llvm-project/pull/73718.diff 13 Files Affected:
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"
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
jdoerfert
force-pushed
the
offload_prep
branch
from
November 28, 2023 23:52
5a83b32
to
c024b1f
Compare
shiltian
approved these changes
Nov 29, 2023
mhalk
approved these changes
Nov 29, 2023
jdoerfert
force-pushed
the
offload_prep
branch
from
November 29, 2023 16:29
c024b1f
to
b587a1e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.