[llvm] [Offload][NFC] Rename 'omp::target` namespace to `offload` (PR #195682)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 09:12:46 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-amdgpu

Author: Joseph Huber (jhuber6)

<details>
<summary>Changes</summary>

Summary:
We should minimize specifically referring to 'OpenMP' in the plugin
interface. These functions are not exported so we are free to rename
them.


---

Patch is 40.72 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/195682.diff


52 Files Affected:

- (modified) offload/include/OffloadPolicy.h (+1-1) 
- (modified) offload/include/OpenMP/OMPT/Callback.h (+3-5) 
- (modified) offload/include/OpenMP/OMPT/Connector.h (+1-1) 
- (modified) offload/include/OpenMP/OMPT/Interface.h (+3-5) 
- (modified) offload/include/PluginManager.h (+1-1) 
- (modified) offload/include/Shared/Debug.h (+5-6) 
- (modified) offload/include/Shared/RefCnt.h (+2-4) 
- (modified) offload/include/device.h (+3-3) 
- (modified) offload/liboffload/src/OffloadImpl.cpp (+4-4) 
- (modified) offload/libomptarget/LegacyAPI.cpp (+2-2) 
- (modified) offload/libomptarget/OffloadRTL.cpp (+3-3) 
- (modified) offload/libomptarget/OpenMP/API.cpp (+3-3) 
- (modified) offload/libomptarget/OpenMP/InteropAPI.cpp (+1-1) 
- (modified) offload/libomptarget/OpenMP/Mapping.cpp (+1-1) 
- (modified) offload/libomptarget/OpenMP/OMPT/Callback.cpp (+14-14) 
- (modified) offload/libomptarget/PluginManager.cpp (+1-1) 
- (modified) offload/libomptarget/device.cpp (+3-3) 
- (modified) offload/libomptarget/interface.cpp (+2-2) 
- (modified) offload/libomptarget/omptarget.cpp (+2-2) 
- (modified) offload/plugins-nextgen/amdgpu/src/rtl.cpp (+4-6) 
- (modified) offload/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h (+2-4) 
- (modified) offload/plugins-nextgen/common/include/ErrorReporting.h (+2-4) 
- (modified) offload/plugins-nextgen/common/include/GlobalHandler.h (+2-4) 
- (modified) offload/plugins-nextgen/common/include/JIT.h (+3-5) 
- (modified) offload/plugins-nextgen/common/include/PluginInterface.h (+3-4) 
- (modified) offload/plugins-nextgen/common/include/RPC.h (+2-2) 
- (modified) offload/plugins-nextgen/common/include/RecordReplay.h (+2-4) 
- (modified) offload/plugins-nextgen/common/src/GlobalHandler.cpp (+1-2) 
- (modified) offload/plugins-nextgen/common/src/JIT.cpp (+2-3) 
- (modified) offload/plugins-nextgen/common/src/PluginInterface.cpp (+1-2) 
- (modified) offload/plugins-nextgen/common/src/RPC.cpp (+1-2) 
- (modified) offload/plugins-nextgen/common/src/RecordReplay.cpp (+1-2) 
- (modified) offload/plugins-nextgen/cuda/src/rtl.cpp (+4-6) 
- (modified) offload/plugins-nextgen/host/src/rtl.cpp (+4-6) 
- (modified) offload/plugins-nextgen/level_zero/include/AsyncQueue.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/include/L0Context.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/include/L0Defs.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/include/L0Device.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/include/L0Interop.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/include/L0Kernel.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/include/L0Memory.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/include/L0Options.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/include/L0Plugin.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/include/L0Program.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/include/TLS.h (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/src/L0Context.cpp (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/src/L0Device.cpp (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/src/L0Kernel.cpp (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/src/L0Memory.cpp (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/src/L0Options.cpp (+2-2) 
- (modified) offload/plugins-nextgen/level_zero/src/L0Plugin.cpp (+5-5) 
- (modified) offload/plugins-nextgen/level_zero/src/L0Program.cpp (+2-2) 


``````````diff
diff --git a/offload/include/OffloadPolicy.h b/offload/include/OffloadPolicy.h
index 9354e45b61af7..c258f2cc904f5 100644
--- a/offload/include/OffloadPolicy.h
+++ b/offload/include/OffloadPolicy.h
@@ -16,7 +16,7 @@
 
 #include "PluginManager.h"
 
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::debug;
 
 enum kmp_target_offload_kind_t {
   tgt_disabled = 0,
diff --git a/offload/include/OpenMP/OMPT/Callback.h b/offload/include/OpenMP/OMPT/Callback.h
index 9d545c643223f..b3ce05e325e70 100644
--- a/offload/include/OpenMP/OMPT/Callback.h
+++ b/offload/include/OpenMP/OMPT/Callback.h
@@ -29,7 +29,7 @@
 
 #define performIfOmptInitialized(stmt)                                         \
   do {                                                                         \
-    if (llvm::omp::target::ompt::Initialized) {                                \
+    if (llvm::offload::ompt::Initialized) {                                    \
       stmt;                                                                    \
     }                                                                          \
   } while (0)
@@ -45,8 +45,7 @@
 typedef uint64_t (*IdInterfaceTy)();
 
 namespace llvm {
-namespace omp {
-namespace target {
+namespace offload {
 namespace ompt {
 
 #define declareOmptCallback(Name, Type, Code) extern Name##_t Name##_fn;
@@ -92,8 +91,7 @@ void connectLibrary();
 extern bool Initialized;
 
 } // namespace ompt
-} // namespace target
-} // namespace omp
+} // namespace offload
 } // namespace llvm
 
 #pragma pop_macro("DEBUG_PREFIX")
diff --git a/offload/include/OpenMP/OMPT/Connector.h b/offload/include/OpenMP/OMPT/Connector.h
index add8941cc4905..dbaa6406571d9 100644
--- a/offload/include/OpenMP/OMPT/Connector.h
+++ b/offload/include/OpenMP/OMPT/Connector.h
@@ -27,7 +27,7 @@
 
 #include "Shared/Debug.h"
 
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::debug;
 
 #pragma push_macro("DEBUG_PREFIX")
 #undef DEBUG_PREFIX
diff --git a/offload/include/OpenMP/OMPT/Interface.h b/offload/include/OpenMP/OMPT/Interface.h
index 43fb193bc75a6..72b9a2dca7cd2 100644
--- a/offload/include/OpenMP/OMPT/Interface.h
+++ b/offload/include/OpenMP/OMPT/Interface.h
@@ -33,8 +33,7 @@ typedef ompt_data_t *(*ompt_get_task_data_t)();
 typedef ompt_data_t *(*ompt_get_target_task_data_t)();
 
 namespace llvm {
-namespace omp {
-namespace target {
+namespace offload {
 namespace ompt {
 
 /// Function pointers that will be used to track task_data and
@@ -315,12 +314,11 @@ class ReturnAddressSetterRAII {
 };
 
 } // namespace ompt
-} // namespace target
-} // namespace omp
+} // namespace offload
 } // namespace llvm
 
 // The getter returns the address stored in the thread local variable.
-#define OMPT_GET_RETURN_ADDRESS llvm::omp::target::ompt::ReturnAddress
+#define OMPT_GET_RETURN_ADDRESS llvm::offload::ompt::ReturnAddress
 
 #else
 #define OMPT_IF_BUILT(stmt)
diff --git a/offload/include/PluginManager.h b/offload/include/PluginManager.h
index 6c6fdebe76dff..499151592f9d5 100644
--- a/offload/include/PluginManager.h
+++ b/offload/include/PluginManager.h
@@ -37,7 +37,7 @@
 
 #include "OpenMP/InteropAPI.h"
 
-using GenericPluginTy = llvm::omp::target::plugin::GenericPluginTy;
+using GenericPluginTy = llvm::offload::plugin::GenericPluginTy;
 
 /// Struct for the data required to handle plugins
 struct PluginManager {
diff --git a/offload/include/Shared/Debug.h b/offload/include/Shared/Debug.h
index 34f09051f41ba..e3eb7115af043 100644
--- a/offload/include/Shared/Debug.h
+++ b/offload/include/Shared/Debug.h
@@ -578,8 +578,7 @@ constexpr const char *OLDT_Module = "Module";
 
 } // namespace llvm::offload::debug
 
-namespace llvm::omp::target::debug {
-using namespace llvm::offload::debug;
+namespace llvm::offload::debug {
 
 enum OmpDebugLevel : uint32_t {
   ODL_Default = 1,
@@ -644,7 +643,7 @@ static inline odbg_ostream reportErrorStream() {
 
 // helper macro to support old DP and REPORT macros with printf syntax
 #define FORMAT_TO_STR(Format, ...)                                             \
-  ::llvm::omp::target::debug::formatToStr(Format __VA_OPT__(, ) __VA_ARGS__)
+  ::llvm::offload::debug::formatToStr(Format __VA_OPT__(, ) __VA_ARGS__)
 
 template <uint32_t InfoId> static constexpr const char *InfoIdToODT() {
   constexpr auto getId = []() {
@@ -676,7 +675,7 @@ template <uint32_t InfoId> static constexpr const char *InfoIdToODT() {
 
 // Transform the INFO id to the corresponding debug type and print the message
 #define INFO_DEBUG_INT(_flags, _id, ...)                                       \
-  ODBG(::llvm::omp::target::debug::InfoIdToODT<_flags>())                      \
+  ODBG(::llvm::offload::debug::InfoIdToODT<_flags>())                          \
       << FORMAT_TO_STR(__VA_ARGS__);
 
 // Define default format for pointers
@@ -694,8 +693,8 @@ static inline raw_ostream &operator<<(raw_ostream &Os, void *Ptr) {
 #endif // OMPTARGET_DEBUG
 
 // New REPORT macro in the same style as ODBG
-#define REPORT() ::llvm::omp::target::debug::reportErrorStream()
+#define REPORT() ::llvm::offload::debug::reportErrorStream()
 
-} // namespace llvm::omp::target::debug
+} // namespace llvm::offload::debug
 
 #endif // OMPTARGET_SHARED_DEBUG_H
diff --git a/offload/include/Shared/RefCnt.h b/offload/include/Shared/RefCnt.h
index 5031a6ff90246..459c76e072764 100644
--- a/offload/include/Shared/RefCnt.h
+++ b/offload/include/Shared/RefCnt.h
@@ -17,8 +17,7 @@
 #include <memory>
 
 namespace llvm {
-namespace omp {
-namespace target {
+namespace offload {
 
 /// Utility class for thread-safe reference counting. Any class that needs
 /// objects' reference counting can inherit from this entity or have it as a
@@ -49,8 +48,7 @@ struct RefCountTy {
   /// The atomic reference counter.
   std::atomic<Ty> Refs;
 };
-} // namespace target
-} // namespace omp
+} // namespace offload
 } // namespace llvm
 
 #endif
diff --git a/offload/include/device.h b/offload/include/device.h
index af103c316c3cf..f10b7960b557f 100644
--- a/offload/include/device.h
+++ b/offload/include/device.h
@@ -36,9 +36,9 @@
 #include "GlobalHandler.h"
 #include "PluginInterface.h"
 
-using GenericPluginTy = llvm::omp::target::plugin::GenericPluginTy;
-using DeviceInfo = llvm::omp::target::plugin::DeviceInfo;
-using InfoTreeNode = llvm::omp::target::plugin::InfoTreeNode;
+using GenericPluginTy = llvm::offload::plugin::GenericPluginTy;
+using DeviceInfo = llvm::offload::plugin::DeviceInfo;
+using InfoTreeNode = llvm::offload::plugin::InfoTreeNode;
 
 // Forward declarations.
 struct __tgt_bin_desc;
diff --git a/offload/liboffload/src/OffloadImpl.cpp b/offload/liboffload/src/OffloadImpl.cpp
index 71712c2bc6b45..7078670f900c4 100644
--- a/offload/liboffload/src/OffloadImpl.cpp
+++ b/offload/liboffload/src/OffloadImpl.cpp
@@ -27,17 +27,17 @@
 // it would be better to allow the plugins to implement callbacks without
 // pulling in details from libomptarget.
 #ifdef OMPT_SUPPORT
-namespace llvm::omp::target {
+namespace llvm::offload {
 namespace ompt {
 bool Initialized = false;
 ompt_get_callback_t lookupCallbackByCode = nullptr;
 ompt_function_lookup_t lookupCallbackByName = nullptr;
 } // namespace ompt
-} // namespace llvm::omp::target
+} // namespace llvm::offload
 #endif
 
-using namespace llvm::omp::target;
-using namespace llvm::omp::target::plugin;
+using namespace llvm::offload;
+using namespace llvm::offload::plugin;
 using namespace error;
 
 struct ol_platform_impl_t {
diff --git a/offload/libomptarget/LegacyAPI.cpp b/offload/libomptarget/LegacyAPI.cpp
index b76159bbc5836..4f1a42803b575 100644
--- a/offload/libomptarget/LegacyAPI.cpp
+++ b/offload/libomptarget/LegacyAPI.cpp
@@ -17,9 +17,9 @@
 #include "Shared/Profile.h"
 
 #ifdef OMPT_SUPPORT
-using namespace llvm::omp::target::ompt;
+using namespace llvm::offload::ompt;
 #endif
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::debug;
 
 EXTERN void __tgt_target_data_begin(int64_t DeviceId, int32_t ArgNum,
                                     void **ArgsBase, void **Args,
diff --git a/offload/libomptarget/OffloadRTL.cpp b/offload/libomptarget/OffloadRTL.cpp
index 9b02376609cee..e457a6d7d4e87 100644
--- a/offload/libomptarget/OffloadRTL.cpp
+++ b/offload/libomptarget/OffloadRTL.cpp
@@ -17,9 +17,9 @@
 #include "Shared/Profile.h"
 
 #ifdef OMPT_SUPPORT
-extern void llvm::omp::target::ompt::connectLibrary();
+extern void llvm::offload::ompt::connectLibrary();
 #endif
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::debug;
 
 static std::mutex PluginMtx;
 static uint32_t RefCount = 0;
@@ -50,7 +50,7 @@ void initRuntime() {
     ODBG(ODT_Init) << "Init offload library!";
 #ifdef OMPT_SUPPORT
     // Initialize OMPT first
-    llvm::omp::target::ompt::connectLibrary();
+    llvm::offload::ompt::connectLibrary();
 #endif
 
     PM->init();
diff --git a/offload/libomptarget/OpenMP/API.cpp b/offload/libomptarget/OpenMP/API.cpp
index 6dcd94e48e987..98c5394f7993a 100644
--- a/offload/libomptarget/OpenMP/API.cpp
+++ b/offload/libomptarget/OpenMP/API.cpp
@@ -37,11 +37,11 @@ EXTERN void ompx_dump_mapping_tables() {
 }
 
 #ifdef OMPT_SUPPORT
-using namespace llvm::omp::target::ompt;
+using namespace llvm::offload::ompt;
 #endif
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::debug;
 
-using GenericDeviceTy = llvm::omp::target::plugin::GenericDeviceTy;
+using GenericDeviceTy = llvm::offload::plugin::GenericDeviceTy;
 
 void *targetAllocExplicit(size_t Size, int DeviceNum, int Kind,
                           const char *Name);
diff --git a/offload/libomptarget/OpenMP/InteropAPI.cpp b/offload/libomptarget/OpenMP/InteropAPI.cpp
index 2eaf376e74268..360748b3cd741 100644
--- a/offload/libomptarget/OpenMP/InteropAPI.cpp
+++ b/offload/libomptarget/OpenMP/InteropAPI.cpp
@@ -18,7 +18,7 @@
 #include <cstdlib>
 #include <cstring>
 
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::debug;
 
 namespace {
 omp_interop_rc_t getPropertyErrorType(omp_interop_property_t Property) {
diff --git a/offload/libomptarget/OpenMP/Mapping.cpp b/offload/libomptarget/OpenMP/Mapping.cpp
index 1bb2e424bd083..7906cab380a91 100644
--- a/offload/libomptarget/OpenMP/Mapping.cpp
+++ b/offload/libomptarget/OpenMP/Mapping.cpp
@@ -15,7 +15,7 @@
 #include "Shared/Requirements.h"
 #include "device.h"
 
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::debug;
 
 /// Dump a table of all the host-target pointer pairs on failure
 void dumpTargetPointerMappings(const ident_t *Loc, DeviceTy &Device,
diff --git a/offload/libomptarget/OpenMP/OMPT/Callback.cpp b/offload/libomptarget/OpenMP/OMPT/Callback.cpp
index c107fa00ce291..5070fbe403096 100644
--- a/offload/libomptarget/OpenMP/OMPT/Callback.cpp
+++ b/offload/libomptarget/OpenMP/OMPT/Callback.cpp
@@ -29,7 +29,7 @@
 
 // Define OMPT callback functions (bound to actual callbacks later on)
 #define defineOmptCallback(Name, Type, Code)                                   \
-  Name##_t llvm::omp::target::ompt::Name##_fn = nullptr;
+  Name##_t llvm::offload::ompt::Name##_fn = nullptr;
 FOREACH_OMPT_NOEMI_EVENT(defineOmptCallback)
 FOREACH_OMPT_EMI_EVENT(defineOmptCallback)
 #undef defineOmptCallback
@@ -37,8 +37,8 @@ FOREACH_OMPT_EMI_EVENT(defineOmptCallback)
 // See definition in OpenMP (omp.h.var/omp_lib.(F90|h).var)
 #define omp_initial_device -1
 
-using namespace llvm::omp::target::ompt;
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::ompt;
+using namespace llvm::offload::debug;
 
 /// Forward declaration
 class LibomptargetRtlFinalizer;
@@ -46,14 +46,14 @@ class LibomptargetRtlFinalizer;
 /// Object that will maintain the RTL finalizer from the plugin
 LibomptargetRtlFinalizer *LibraryFinalizer = nullptr;
 
-thread_local Interface llvm::omp::target::ompt::RegionInterface;
+thread_local Interface llvm::offload::ompt::RegionInterface;
 
-thread_local void *llvm::omp::target::ompt::ReturnAddress = nullptr;
+thread_local void *llvm::offload::ompt::ReturnAddress = nullptr;
 
-bool llvm::omp::target::ompt::Initialized = false;
+bool llvm::offload::ompt::Initialized = false;
 
-ompt_get_callback_t llvm::omp::target::ompt::lookupCallbackByCode = nullptr;
-ompt_function_lookup_t llvm::omp::target::ompt::lookupCallbackByName = nullptr;
+ompt_get_callback_t llvm::offload::ompt::lookupCallbackByCode = nullptr;
+ompt_function_lookup_t llvm::offload::ompt::lookupCallbackByName = nullptr;
 ompt_get_target_task_data_t ompt_get_target_task_data_fn = nullptr;
 ompt_get_task_data_t ompt_get_task_data_fn = nullptr;
 
@@ -466,9 +466,9 @@ class LibomptargetRtlFinalizer {
   llvm::SmallVector<ompt_finalize_t> RtlFinalizationFunctions;
 };
 
-int llvm::omp::target::ompt::initializeLibrary(ompt_function_lookup_t lookup,
-                                               int initial_device_num,
-                                               ompt_data_t *tool_data) {
+int llvm::offload::ompt::initializeLibrary(ompt_function_lookup_t lookup,
+                                           int initial_device_num,
+                                           ompt_data_t *tool_data) {
   ODBG(ODT_Tool) << "Executing initializeLibrary";
 #define bindOmptFunctionName(OmptFunction, DestinationFunction)                \
   if (lookup)                                                                  \
@@ -499,7 +499,7 @@ int llvm::omp::target::ompt::initializeLibrary(ompt_function_lookup_t lookup,
   return 0;
 }
 
-void llvm::omp::target::ompt::finalizeLibrary(ompt_data_t *data) {
+void llvm::offload::ompt::finalizeLibrary(ompt_data_t *data) {
   ODBG(ODT_Tool) << "Executing finalizeLibrary";
   // Before disabling OMPT, call the (plugin) finalizations that were registered
   // with this library
@@ -508,7 +508,7 @@ void llvm::omp::target::ompt::finalizeLibrary(ompt_data_t *data) {
   Initialized = false;
 }
 
-void llvm::omp::target::ompt::connectLibrary() {
+void llvm::offload::ompt::connectLibrary() {
   ODBG(ODT_Tool) << "Entering connectLibrary";
   // Connect with libomp
   static OmptLibraryConnectorTy LibompConnector("libomp");
@@ -527,7 +527,7 @@ void llvm::omp::target::ompt::connectLibrary() {
   if (lookupCallbackByCode)                                                    \
     lookupCallbackByCode(                                                      \
         (ompt_callbacks_t)(Code),                                              \
-        (ompt_callback_t *)&(llvm::omp::target::ompt::Name##_fn));
+        (ompt_callback_t *)&(llvm::offload::ompt::Name##_fn));
   FOREACH_OMPT_NOEMI_EVENT(bindOmptCallback)
   FOREACH_OMPT_EMI_EVENT(bindOmptCallback)
 #undef bindOmptCallback
diff --git a/offload/libomptarget/PluginManager.cpp b/offload/libomptarget/PluginManager.cpp
index 41b653a60adfd..43139e70f1b1b 100644
--- a/offload/libomptarget/PluginManager.cpp
+++ b/offload/libomptarget/PluginManager.cpp
@@ -22,7 +22,7 @@
 
 using namespace llvm;
 using namespace llvm::sys;
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::debug;
 
 PluginManager *PM = nullptr;
 
diff --git a/offload/libomptarget/device.cpp b/offload/libomptarget/device.cpp
index 546f679353544..2d5ac08edfbf4 100644
--- a/offload/libomptarget/device.cpp
+++ b/offload/libomptarget/device.cpp
@@ -34,11 +34,11 @@
 #include <thread>
 
 #ifdef OMPT_SUPPORT
-using namespace llvm::omp::target::ompt;
+using namespace llvm::offload::ompt;
 #endif
 
-using namespace llvm::omp::target::plugin;
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::plugin;
+using namespace llvm::offload::debug;
 
 int HostDataToTargetTy::addEventIfNecessary(DeviceTy &Device,
                                             AsyncInfoTy &AsyncInfo) const {
diff --git a/offload/libomptarget/interface.cpp b/offload/libomptarget/interface.cpp
index f65ca3cadee8c..08ba8b81c5a8d 100644
--- a/offload/libomptarget/interface.cpp
+++ b/offload/libomptarget/interface.cpp
@@ -34,9 +34,9 @@
 #include <vector>
 
 #ifdef OMPT_SUPPORT
-using namespace llvm::omp::target::ompt;
+using namespace llvm::offload::ompt;
 #endif
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::debug;
 
 // If offload is enabled, ensure that device DeviceID has been initialized.
 //
diff --git a/offload/libomptarget/omptarget.cpp b/offload/libomptarget/omptarget.cpp
index 82a0ed73317d5..65651ac336045 100644
--- a/offload/libomptarget/omptarget.cpp
+++ b/offload/libomptarget/omptarget.cpp
@@ -39,9 +39,9 @@
 
 using llvm::SmallVector;
 #ifdef OMPT_SUPPORT
-using namespace llvm::omp::target::ompt;
+using namespace llvm::offload::ompt;
 #endif
-using namespace llvm::omp::target::debug;
+using namespace llvm::offload::debug;
 
 int AsyncInfoTy::synchronize() {
   int Result = OFFLOAD_SUCCESS;
diff --git a/offload/plugins-nextgen/amdgpu/src/rtl.cpp b/offload/plugins-nextgen/amdgpu/src/rtl.cpp
index f4e81025a285d..e109c1be22de2 100644
--- a/offload/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/offload/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -80,8 +80,7 @@ using namespace llvm::offload::debug;
 using namespace error;
 
 namespace llvm {
-namespace omp {
-namespace target {
+namespace offload {
 namespace plugin {
 
 /// Forward declarations for all specialized data structures.
@@ -4369,12 +4368,11 @@ void AMDGPUQueueTy::callbackError(hsa_status_t Status, hsa_queue_t *Source,
 }
 
 } // namespace plugin
-} // namespace target
-} // namespace omp
+} // namespace offload
 } // namespace llvm
 
 extern "C" {
-llvm::omp::target::plugin::GenericPluginTy *createPlugin_amdgpu() {
-  return new llvm::omp::target::plugin::AMDGPUPluginTy();
+llvm::offload::plugin::GenericPluginTy *createPlugin_amdgpu() {
+  return new llvm::offload::plugin::AMDGPUPluginTy();
 }
 }
diff --git a/offload/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h b/offload/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h
index f41d62ee14e54..765c009abbf36 100644
--- a/offload/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h
+++ b/offload/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h
@@ -21,8 +21,7 @@
 #include "llvm/Frontend/Offloading/Utility.h"
 
 namespace llvm {
-namespace omp {
-namespace target {
+namespace offload {
 namespace plugin {
 namespace hsa_utils {
 
@@ -75,6 +74,5 @@ void initImplArg(AMDGPUImplicitArgsTy *Base,
 
 } // namespace hsa_utils
 } // namespace plugin
-} // namespace target
-} // namespace omp
+} // namespace offload
 } // namespace llvm
diff --git a/offload/plugins-nextgen/common/include/ErrorReporting.h b/offload/plugins-nextgen/common/include/ErrorReporting.h
index ff7d9b4f39d2b..5300691e84ff3 100644
--- a/offload/plugins-nextgen/common/include/ErrorReporting.h
+++ b/offload/plugins-nextgen/common/include/ErrorReporting.h
@@ -30,8 +30,7 @@
 #include <string>
 
 namespace llvm {
-namespace omp {
-namespace target {
+namespace offload {
 namespace plugin {
 
 class ErrorReporter {
@@ -370,8 +369,7 @@ class ErrorReporter {
 };
 
 } // namespace plugin
-} // namespace target
-} // namespace omp
+} // namespace offload
 } // namespace llvm
 
 #endif // OFFLOAD_PLUGINS_NEXTGEN_COMMON_ERROR_REPORTING_H
diff --git a/offload/plugins-nextgen/common/include/GlobalHandler.h b/offload/plugins-nextgen/common/include/GlobalHandler.h
index fc8d6fe384754..b240c2dc302d2 100644
--- a/offload/plugins-nextgen/common/include/GlobalHandler.h
+++ b/offload/plugins-nextgen/common/include/GlobalHandler.h
@@ -25,8 +25,7 @@
 #include "omptarget.h"
 
 namespace llvm {
-namespace omp {
-namespace target {
+namespace offload {
 namespace plugin {
 
 class DeviceImageTy;
@@ -217,8 +216,7 @@ class GenericGlobalHandlerTy {
 };
 
 } // namespace plugin
-} // namespace target
-} // namespace omp
+} // namespace offload
 } // namespace llvm
 
 #endif // LLVM_OPENMP_LIBOMPTARGET_PLUGINS_NEXTGEN_COMMON_GLOBALHANDLER_H
diff --git a/offload/plugins-nextgen/common/include/JIT.h b/offload/plugins-nextgen/common/include/JIT.h
index b4e3712d9c980..a6a04bfad7685 100644
--- a/offload/plugins-nextgen/common/include/JIT.h
+++ b/offload/plugins-nextgen/common/include/JIT.h
@@ -32,8 +32,7 @@ struct __tgt_device_image;
 namespace llvm {
 class MemoryBuffer;
 
-namespace omp {
-namespace target {
+namespace offload {
 namespace plugin {
 struct GenericDeviceTy;
 } // namespace plugin
@@ -52,7 +51,7 @@ struct JITEngine {
   /// return \p Image. It is expected to return a memory buffer containing the
   /// generated device image that could be loaded to the device directly.
   Expected<...
[truncated]

``````````

</details>


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


More information about the llvm-commits mailing list