Page MenuHomePhabricator

[Libomptarget] Do not check for valid binaries twice.
ClosedPublic

Authored by jhuber6 on Aug 8 2022, 2:29 PM.

Details

Summary

The only RTLs that get added to the UsedRTLs list have already been
checked is they were valid binaries. We shouldn't need to do this again
when we unregister all the used binaries as they wouldn't have been used
if they were invalid anyway. Let me know if I'm incorrect in this
assumption.

Diff Detail

Event Timeline

jhuber6 created this revision.Aug 8 2022, 2:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 2:29 PM
jhuber6 requested review of this revision.Aug 8 2022, 2:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 2:29 PM
tianshilei1992 added inline comments.Aug 8 2022, 2:31 PM
openmp/libomptarget/src/rtl.cpp
524

Is it necessary to still keep it?

jhuber6 added inline comments.Aug 8 2022, 2:32 PM
openmp/libomptarget/src/rtl.cpp
524

It's only used for a debug print message at the end of the loop to say "No RTL's found for Image". We can get rid of that if necessary.

Actually, the RTL may contain more images than the ones we added. So we probably should just have a separate list of images used inside of the RTL type and just exit if it's not in that set.

jhuber6 updated this revision to Diff 450960.Aug 8 2022, 2:49 PM

Adding a set to contain the images used by the RTL instead. Should still save us time going into the plugin to check if the image is valid, espeically when we need to check runtime values like the target architecture.

jhuber6 updated this revision to Diff 451174.Aug 9 2022, 8:45 AM

Remove unneeded info value.

jdoerfert accepted this revision.Aug 26 2022, 10:32 AM

LG

openmp/libomptarget/include/rtl.h
132

Documentation plz.

This revision is now accepted and ready to land.Aug 26 2022, 10:32 AM
This revision was automatically updated to reflect the committed changes.