Skip to content

Commit 9c33bf6

Browse files
committed
[OpenMP][NFC] Remove unused (un)register_lib plugin API
These APIs have not been hooked up for a while. No need to carry them.
1 parent ab14eb2 commit 9c33bf6

File tree

4 files changed

+0
-25
lines changed

4 files changed

+0
-25
lines changed

openmp/libomptarget/include/rtl.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ struct RTLInfoTy {
5656
typedef int64_t(init_requires_ty)(int64_t);
5757
typedef int32_t(synchronize_ty)(int32_t, __tgt_async_info *);
5858
typedef int32_t(query_async_ty)(int32_t, __tgt_async_info *);
59-
typedef int32_t (*register_lib_ty)(__tgt_bin_desc *);
6059
typedef int32_t(supports_empty_images_ty)();
6160
typedef void(print_device_info_ty)(int32_t);
6261
typedef void(set_info_flag_ty)(uint32_t);
@@ -111,8 +110,6 @@ struct RTLInfoTy {
111110
init_requires_ty *init_requires = nullptr;
112111
synchronize_ty *synchronize = nullptr;
113112
query_async_ty *query_async = nullptr;
114-
register_lib_ty register_lib = nullptr;
115-
register_lib_ty unregister_lib = nullptr;
116113
supports_empty_images_ty *supports_empty_images = nullptr;
117114
set_info_flag_ty *set_info_flag = nullptr;
118115
print_device_info_ty *print_device_info = nullptr;

openmp/libomptarget/src/interface.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@ EXTERN void __tgt_register_lib(__tgt_bin_desc *Desc) {
4545
if (PM->maybeDelayRegisterLib(Desc))
4646
return;
4747

48-
for (auto &RTL : PM->RTLs.AllRTLs) {
49-
if (RTL.register_lib) {
50-
if ((*RTL.register_lib)(Desc) != OFFLOAD_SUCCESS) {
51-
DP("Could not register library with %s", RTL.RTLName.c_str());
52-
}
53-
}
54-
}
5548
PM->RTLs.registerLib(Desc);
5649
}
5750

@@ -64,13 +57,6 @@ EXTERN void __tgt_init_all_rtls() { PM->RTLs.initAllRTLs(); }
6457
EXTERN void __tgt_unregister_lib(__tgt_bin_desc *Desc) {
6558
TIMESCOPE();
6659
PM->RTLs.unregisterLib(Desc);
67-
for (auto &RTL : PM->RTLs.UsedRTLs) {
68-
if (RTL->unregister_lib) {
69-
if ((*RTL->unregister_lib)(Desc) != OFFLOAD_SUCCESS) {
70-
DP("Could not register library with %s", RTL->RTLName.c_str());
71-
}
72-
}
73-
}
7460
}
7561

7662
template <typename TargetAsyncInfoTy>

openmp/libomptarget/src/rtl.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,6 @@ bool RTLsTy::attemptLoadRTL(const std::string &RTLName, RTLInfoTy &RTL) {
215215
DynLibrary->getAddressOfSymbol("__tgt_rtl_data_exchange_async");
216216
*((void **)&RTL.is_data_exchangable) =
217217
DynLibrary->getAddressOfSymbol("__tgt_rtl_is_data_exchangable");
218-
*((void **)&RTL.register_lib) =
219-
DynLibrary->getAddressOfSymbol("__tgt_rtl_register_lib");
220-
*((void **)&RTL.unregister_lib) =
221-
DynLibrary->getAddressOfSymbol("__tgt_rtl_unregister_lib");
222218
*((void **)&RTL.supports_empty_images) =
223219
DynLibrary->getAddressOfSymbol("__tgt_rtl_supports_empty_images");
224220
*((void **)&RTL.set_info_flag) =

openmp/libomptarget/tools/kernelreplay/llvm-omp-kernel-replay.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,5 @@ int main(int argc, char **argv) {
195195

196196
delete[] recored_data;
197197

198-
// TODO: calling unregister lib causes plugin deinit error for nextgen
199-
// plugins.
200-
//__tgt_unregister_lib(&Desc);
201-
202198
return 0;
203199
}

0 commit comments

Comments
 (0)