diff --git a/openmp/libomptarget/include/rtl.h b/openmp/libomptarget/include/rtl.h index 0c751cd36bfd2..b305b8f9c398f 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 1e6bfec012f3d..175b1e2b148bf 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 diff --git a/openmp/libomptarget/src/rtl.cpp b/openmp/libomptarget/src/rtl.cpp index d74592035bf9e..b48a3fccd86fc 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 67304fdca61d4..5041173d21eba 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; }