[llvm] [SampleFDO] Read call-graph matching recovered top-level function profile (PR #101053)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 10:59:04 PDT 2024
================
@@ -880,17 +933,8 @@ void SampleProfileMatcher::runOnModule() {
runOnFunction(*F);
}
- // Update the data in SampleLoader.
if (SalvageUnusedProfile)
- for (auto &I : FuncToProfileNameMap) {
- assert(I.first && "New function is null");
- FunctionId FuncName(I.first->getName());
- FuncNameToProfNameMap->emplace(FuncName, I.second);
- // We need to remove the old entry to avoid duplicating the function
- // processing.
- SymbolMap->erase(FuncName);
- SymbolMap->emplace(I.second, I.first);
- }
+ UpdateSampleLoaderWithRecoveredProfiles();
----------------
WenleiHe wrote:
nit: rename as `UpdateWithSalvagedProfiles`?
https://github.com/llvm/llvm-project/pull/101053
More information about the llvm-commits
mailing list