[llvm] [SampleProfileMatcher] Add direct basename early matching for orphan functions (PR #184409)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 3 09:53:18 PDT 2026
WenleiHe wrote:
> This direct basename matching runs before CG matching and writes to FuncToProfileNameMap. CG matching can later overwrite these entries (since SymbolMap is not updated until UpdateWithSalvagedProfiles), so a contextually better CG match is not blocked.
This override may not be clean.. we could have an incorrect basdname matching early then, then CG matching for callee based on that incorrect basename matching, and later CG matching overwrite that incorrect matching, but won't be able to undo callee matching of the incorrect one.
Ideally we should prioritize the more accurate matching and use basename only as a fall back? If we do find basename matching during the fall back, we can also kick off another round of CG matching to propagate the matches to callees.
https://github.com/llvm/llvm-project/pull/184409
More information about the llvm-commits
mailing list