aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/ModuleUtils.cpp
diff options
context:
space:
mode:
authorPaul Kirth <paulkirth@google.com>2023-01-05 00:26:36 +0000
committerPaul Kirth <paulkirth@google.com>2023-01-11 21:53:21 +0000
commit6e5cbc097a5ac7fa95a8f425af8b03958151c763 (patch)
tree1091a112439132c74215f3fc54df138c7625e9e5 /llvm/lib/Transforms/Utils/ModuleUtils.cpp
parent65388086e68245c11c5acf5cd6b3570d8e4d11bf (diff)
downloadllvm-6e5cbc097a5ac7fa95a8f425af8b03958151c763.zip
llvm-6e5cbc097a5ac7fa95a8f425af8b03958151c763.tar.gz
llvm-6e5cbc097a5ac7fa95a8f425af8b03958151c763.tar.bz2
"Reland "[pgo] Avoid introducing relocations by using private alias"
In many cases, we can use an alias to avoid a symbolic relocations, instead of using the public, interposable symbol. When the instrumented function is in a COMDAT, we can use a hidden alias, and still avoid references to discarded sections. Previous versions of this patch allowed the compiler to name the generated alias, but that would only be valid when the functions were local. Since the alias may be used across TUs we use a more deterministic naming convention, and add a .local suffix to the alias name just as we do for relative vtables aliases. This should be safe to land after an incorrect LLD assertion was removed in https://reviews.llvm.org/rG20894a478da224bdd69c91a22a5175b28bc08ed9 which caused assertion failures in LLD on Mac. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D137982
Diffstat (limited to 'llvm/lib/Transforms/Utils/ModuleUtils.cpp')
0 files changed, 0 insertions, 0 deletions