[all-commits] [llvm/llvm-project] 9a2df5: [InstrProf] No linkage prefixes in IRPGO names (#7...
Ellis Hoag via All-commits
all-commits at lists.llvm.org
Thu Jan 4 16:14:10 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9a2df55f47e4ec02a1efbf8efa776cfeed527df2
https://github.com/llvm/llvm-project/commit/9a2df55f47e4ec02a1efbf8efa776cfeed527df2
Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
Date: 2024-01-04 (Thu, 04 Jan 2024)
Changed paths:
M compiler-rt/test/profile/instrprof-thinlto-indirect-call-promotion.cpp
M lld/test/MachO/pgo-warn-mismatch.ll
M llvm/lib/ProfileData/InstrProf.cpp
M llvm/tools/llvm-profdata/llvm-profdata.cpp
M llvm/unittests/ProfileData/InstrProfTest.cpp
Log Message:
-----------
[InstrProf] No linkage prefixes in IRPGO names (#76994)
Change the format of IRPGO counter names to
`[<filepath>;]<mangled-name>` which is computed by
`GlobalValue::getGlobalIdentifier()` to fix #74565.
In fe051934cbb0aaf25d960d7d45305135635d650b
(https://reviews.llvm.org/D156569) the format of IRPGO counter names was
changed to be `[<filepath>;]<linkage-name>` where `<linkage-name>` is
basically `F.getName()` with some prefix, e.g., `_` or `l_` on Mach-O
(yes, it is confusing that `<linkage-name>` is computed with
`Mangler().getNameWithPrefix()` while `<mangled-name>` is just
`F.getName()`). We discovered in #74565 that this causes some missed
import issues on some targets and #74008 is a partial fix.
Since `<mangled-name>` may not match the `<linkage-name>` on some
targets like Mach-O, we will need to post-process the output of
`llvm-profdata order` before passing to the linker via `-order_file`.
Profiles generated after fe051934cbb0aaf25d960d7d45305135635d650b will
become stale after this diff, but I think this is acceptable since that
patch landed after the LLVM 18 cut which hasn't been released yet.
More information about the All-commits
mailing list