This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Improve symbol resolution for OpenMP Offloading LTO
ClosedPublic

Authored by jhuber6 on Jan 25 2022, 8:29 AM.

Details

Summary

This patch improves the symbol resolution done for LTO with offloading
applications. The symbol resolution done here allows the LTO backend to
internalize more functions. The symbol resoltion done is a simplified
view that does not take into account various options like --wrap or
--dyanimic-list and always assumes we are creating a shared object.
The actual target may be an executable, but semantically it is used as a
shared object because certain objects need to be visible outside of the
executable when they are read by the OpenMP plugin.

Depends on D117246

Diff Detail

Event Timeline

jhuber6 created this revision.Jan 25 2022, 8:29 AM
jhuber6 requested review of this revision.Jan 25 2022, 8:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2022, 8:29 AM

LG with one nit.

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
763–768
tianshilei1992 accepted this revision.Jan 31 2022, 7:55 PM
This revision is now accepted and ready to land.Jan 31 2022, 7:55 PM
jhuber6 added inline comments.Jan 31 2022, 7:56 PM
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
763–768

Fixed.

This revision was landed with ongoing or failed builds.Jan 31 2022, 8:12 PM
This revision was automatically updated to reflect the committed changes.