[Openmp-commits] [PATCH] D94361: [OpenMP] Remove copy constructor of `RTLInfoTy`
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sat Jan 9 08:36:37 PST 2021
JonChesterfield added a comment.
Delighted to see the copy ctor go. That's an easy place to forget to update. It should be explicitly = delete.
Does the move constructor do the right thing on a std::mutex? It'll be called by the vector resizing. Will want it = default after the copy ctor is marked delete iirc.
================
Comment at: openmp/libomptarget/src/rtl.cpp:101
+ ValidPlugin = false;
+ if (ValidPlugin && !(*((void **)&R.number_of_devices) = dlsym(
+ dynlib_handle, "__tgt_rtl_number_of_devices")))
----------------
A plugin missing one of the required functions is an infrequent error.
I think we can drop all the `ValidPlugin &&` statements to get simpler code that runs faster in the normal case, and does a bunch of unnecessary but harmless dlsym on the failing path.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94361/new/
https://reviews.llvm.org/D94361
More information about the Openmp-commits
mailing list