[Openmp-commits] [openmp] f0ccaee - [OpenMP][NFC] Move rtl.cpp to OffloadRTL.cpp

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 11 17:31:00 PST 2023


Author: Johannes Doerfert
Date: 2023-12-11T17:30:35-08:00
New Revision: f0ccaeecd27406937d6f840a9e72ccd14eae4bb5

URL: https://github.com/llvm/llvm-project/commit/f0ccaeecd27406937d6f840a9e72ccd14eae4bb5
DIFF: https://github.com/llvm/llvm-project/commit/f0ccaeecd27406937d6f840a9e72ccd14eae4bb5.diff

LOG: [OpenMP][NFC] Move rtl.cpp to OffloadRTL.cpp

Added: 
    openmp/libomptarget/src/OffloadRTL.cpp

Modified: 
    openmp/libomptarget/src/CMakeLists.txt

Removed: 
    openmp/libomptarget/src/rtl.cpp


################################################################################
diff  --git a/openmp/libomptarget/src/CMakeLists.txt b/openmp/libomptarget/src/CMakeLists.txt
index 42674e2d9daa79..1a0e26f104be63 100644
--- a/openmp/libomptarget/src/CMakeLists.txt
+++ b/openmp/libomptarget/src/CMakeLists.txt
@@ -18,7 +18,7 @@ add_llvm_library(omptarget
   device.cpp
   interface.cpp
   omptarget.cpp
-  rtl.cpp
+  OffloadRTL.cpp
   LegacyAPI.cpp
   PluginManager.cpp
   DeviceImage.cpp

diff  --git a/openmp/libomptarget/src/rtl.cpp b/openmp/libomptarget/src/OffloadRTL.cpp
similarity index 62%
rename from openmp/libomptarget/src/rtl.cpp
rename to openmp/libomptarget/src/OffloadRTL.cpp
index 5eb1c553df4916..061b053c68cc88 100644
--- a/openmp/libomptarget/src/rtl.cpp
+++ b/openmp/libomptarget/src/OffloadRTL.cpp
@@ -6,46 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// Functionality for handling RTL plugins.
+// Initialization and tear down of the offload runtime.
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Object/OffloadBinary.h"
-
-#include "DeviceImage.h"
 #include "OpenMP/OMPT/Callback.h"
 #include "PluginManager.h"
-#include "device.h"
-#include "private.h"
-#include "rtl.h"
 
 #include "Shared/Debug.h"
 #include "Shared/Profile.h"
-#include "Shared/Utils.h"
-
-#include <cassert>
-#include <cstdlib>
-#include <cstring>
-#include <memory>
-#include <mutex>
-#include <string>
-
-using namespace llvm;
-using namespace llvm::sys;
-using namespace llvm::omp::target;
 
 #ifdef OMPT_SUPPORT
-extern void ompt::connectLibrary();
+extern void llvm::omp::target::ompt::connectLibrary();
 #endif
 
 __attribute__((constructor(101))) void init() {
-  DP("Init target library!\n");
+  DP("Init offload library!\n");
 
   PM = new PluginManager();
 
 #ifdef OMPT_SUPPORT
   // Initialize OMPT first
-  ompt::connectLibrary();
+  llvm::omp::target::ompt::connectLibrary();
 #endif
 
   PM->init();
@@ -55,6 +37,6 @@ __attribute__((constructor(101))) void init() {
 }
 
 __attribute__((destructor(101))) void deinit() {
-  DP("Deinit target library!\n");
+  DP("Deinit offload library!\n");
   delete PM;
 }


        


More information about the Openmp-commits mailing list