[pgo] Avoid introducing relocations by using private alias
authorPaul Kirth <paulkirth@google.com>
Mon, 14 Nov 2022 18:12:56 +0000 (18:12 +0000)
committerPaul Kirth <paulkirth@google.com>
Tue, 15 Nov 2022 16:05:24 +0000 (16:05 +0000)
commit2b8917f8ad792c4c484975b82039bbdebe556881
tree18b167f88470d0b6b1c58eb8d162f80fe5ab53a1
parent2323a4ee610f5e1db74d362af4c6fb8c704be8f6
[pgo] Avoid introducing relocations by using private alias

Instead of using the public, interposable symbol, we can use a private
alias and avoid relocations and addends.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D137982
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/test/Transforms/PGOProfile/prof_avoid_relocs.ll [new file with mode: 0644]