[compiler-rt] [clang-tools-extra] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)
Mingming Liu via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 10 20:03:21 PST 2023
minglotus-6 wrote:
> Mach-O (and 32-bit Windows) mangle global symbols with a leading `_`.
It's very helpful to know the name differences exist on Mach-O/COFF to construct a test case for issue 74565.
https://godbolt.org/z/686Y9vYod shows the name difference (cross comparing IR and machine assembly, with and without `--target arm64-apple-macosx`), meaning the compiler-rt test (to be added in this pull-request) could be a test case for issue 74565.
The summary captures key points of the bug. Just to clarify on one detail, the md5 hash is actually computed (or more accurately [mapped](https://github.com/llvm/llvm-project/blob/fc715e4cd942612a091097339841733757b53824/llvm/lib/ProfileData/InstrProf.cpp#L876-L885) from a profiled address to the [NameRef field](https://github.com/llvm/llvm-project/blob/fc715e4cd942612a091097339841733757b53824/compiler-rt/include/profile/InstrProfData.inc#L72) of during `llvm-profdata merge <raw-profile> -o <indexed-profile>`) and [annotated](https://github.com/llvm/llvm-project/blob/fc715e4cd942612a091097339841733757b53824/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp#L1707) on an indirect-call instruction by `pgo-instr-use` pass. Module-summary-analysis pass makes use of this hash by [extracting](https://github.com/llvm/llvm-project/blob/fc715e4cd942612a091097339841733757b53824/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp#L454-L456) it from value profile metadata.
https://github.com/llvm/llvm-project/pull/74008
More information about the cfe-commits
mailing list