[llvm] [SampleProfile] Ignore the .cfi suffix when matching functions to profiles (PR #220271)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 09:06:38 PDT 2026
https://github.com/vitalybuka approved this pull request.
I added a commit to make the test fail without the fix, as now it was passing
There is possible conflict with .cfi and pre-existing same no-.cfi symbols.
llvm-project/llvm/lib/Transforms/IPO/SampleProfile.cpp:2168
```
if (OrigName != NewName && !NewName.empty()) {
auto r = SymbolMap.emplace(FunctionId(NewName), F);
// Failiing to insert means there is already an entry in SymbolMap,
// thus there are multiple functions that are mapped to the same
// stripped name. In this case of name conflicting, set the value
// to nullptr to avoid confusion.
if (!r.second)
r.first->second = nullptr;
OrigName = NewName;
}
```
I think it's uncommon and we should fix this in a separate PR.
LGTM
https://github.com/llvm/llvm-project/pull/220271
More information about the llvm-commits
mailing list