[OpenMP] Improve symbol resolution for OpenMP Offloading LTO
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 14 Jan 2022 03:59:05 +0000 (22:59 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 1 Feb 2022 04:11:42 +0000 (23:11 -0500)
commit46d019041cd924d8bdf69c818bbe13f6cd37f466
tree35951de714050306d1b61ef1b6a4388032eff57c
parentce16ca3c7419fc6cec43d0dae5e9f62df05faf6b
[OpenMP] Improve symbol resolution for OpenMP Offloading LTO

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

Differential Revision: https://reviews.llvm.org/D118155
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp