[Openmp-commits] [openmp] 9c33bf6 - [OpenMP][NFC] Remove unused (un)register_lib plugin API
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Mon Nov 27 11:08:15 PST 2023
Author: Johannes Doerfert
Date: 2023-11-27T11:07:57-08:00
New Revision: 9c33bf62a7f1047e96d9da702baf0d436980fb34
URL: https://github.com/llvm/llvm-project/commit/9c33bf62a7f1047e96d9da702baf0d436980fb34
DIFF: https://github.com/llvm/llvm-project/commit/9c33bf62a7f1047e96d9da702baf0d436980fb34.diff
LOG: [OpenMP][NFC] Remove unused (un)register_lib plugin API
These APIs have not been hooked up for a while. No need to carry them.
Added:
Modified:
openmp/libomptarget/include/rtl.h
openmp/libomptarget/src/interface.cpp
openmp/libomptarget/src/rtl.cpp
openmp/libomptarget/tools/kernelreplay/llvm-omp-kernel-replay.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/include/rtl.h b/openmp/libomptarget/include/rtl.h
index 0c751cd36bfd2d0..b305b8f9c398fc6 100644
--- a/openmp/libomptarget/include/rtl.h
+++ b/openmp/libomptarget/include/rtl.h
@@ -56,7 +56,6 @@ struct RTLInfoTy {
typedef int64_t(init_requires_ty)(int64_t);
typedef int32_t(synchronize_ty)(int32_t, __tgt_async_info *);
typedef int32_t(query_async_ty)(int32_t, __tgt_async_info *);
- typedef int32_t (*register_lib_ty)(__tgt_bin_desc *);
typedef int32_t(supports_empty_images_ty)();
typedef void(print_device_info_ty)(int32_t);
typedef void(set_info_flag_ty)(uint32_t);
@@ -111,8 +110,6 @@ struct RTLInfoTy {
init_requires_ty *init_requires = nullptr;
synchronize_ty *synchronize = nullptr;
query_async_ty *query_async = nullptr;
- register_lib_ty register_lib = nullptr;
- register_lib_ty unregister_lib = nullptr;
supports_empty_images_ty *supports_empty_images = nullptr;
set_info_flag_ty *set_info_flag = nullptr;
print_device_info_ty *print_device_info = nullptr;
diff --git a/openmp/libomptarget/src/interface.cpp b/openmp/libomptarget/src/interface.cpp
index 1e6bfec012f3d59..175b1e2b148bf7d 100644
--- a/openmp/libomptarget/src/interface.cpp
+++ b/openmp/libomptarget/src/interface.cpp
@@ -45,13 +45,6 @@ EXTERN void __tgt_register_lib(__tgt_bin_desc *Desc) {
if (PM->maybeDelayRegisterLib(Desc))
return;
- for (auto &RTL : PM->RTLs.AllRTLs) {
- if (RTL.register_lib) {
- if ((*RTL.register_lib)(Desc) != OFFLOAD_SUCCESS) {
- DP("Could not register library with %s", RTL.RTLName.c_str());
- }
- }
- }
PM->RTLs.registerLib(Desc);
}
@@ -64,13 +57,6 @@ EXTERN void __tgt_init_all_rtls() { PM->RTLs.initAllRTLs(); }
EXTERN void __tgt_unregister_lib(__tgt_bin_desc *Desc) {
TIMESCOPE();
PM->RTLs.unregisterLib(Desc);
- for (auto &RTL : PM->RTLs.UsedRTLs) {
- if (RTL->unregister_lib) {
- if ((*RTL->unregister_lib)(Desc) != OFFLOAD_SUCCESS) {
- DP("Could not register library with %s", RTL->RTLName.c_str());
- }
- }
- }
}
template <typename TargetAsyncInfoTy>
diff --git a/openmp/libomptarget/src/rtl.cpp b/openmp/libomptarget/src/rtl.cpp
index d74592035bf9ef6..b48a3fccd86fccb 100644
--- a/openmp/libomptarget/src/rtl.cpp
+++ b/openmp/libomptarget/src/rtl.cpp
@@ -215,10 +215,6 @@ bool RTLsTy::attemptLoadRTL(const std::string &RTLName, RTLInfoTy &RTL) {
DynLibrary->getAddressOfSymbol("__tgt_rtl_data_exchange_async");
*((void **)&RTL.is_data_exchangable) =
DynLibrary->getAddressOfSymbol("__tgt_rtl_is_data_exchangable");
- *((void **)&RTL.register_lib) =
- DynLibrary->getAddressOfSymbol("__tgt_rtl_register_lib");
- *((void **)&RTL.unregister_lib) =
- DynLibrary->getAddressOfSymbol("__tgt_rtl_unregister_lib");
*((void **)&RTL.supports_empty_images) =
DynLibrary->getAddressOfSymbol("__tgt_rtl_supports_empty_images");
*((void **)&RTL.set_info_flag) =
diff --git a/openmp/libomptarget/tools/kernelreplay/llvm-omp-kernel-replay.cpp b/openmp/libomptarget/tools/kernelreplay/llvm-omp-kernel-replay.cpp
index 67304fdca61d447..5041173d21eba51 100644
--- a/openmp/libomptarget/tools/kernelreplay/llvm-omp-kernel-replay.cpp
+++ b/openmp/libomptarget/tools/kernelreplay/llvm-omp-kernel-replay.cpp
@@ -195,9 +195,5 @@ int main(int argc, char **argv) {
delete[] recored_data;
- // TODO: calling unregister lib causes plugin deinit error for nextgen
- // plugins.
- //__tgt_unregister_lib(&Desc);
-
return 0;
}
More information about the Openmp-commits
mailing list