[BOLT] Sort EntryData (#143308)
Aggregated branch data has two containers: `Data` for local branches, and `EntryData` for external branches. Fix the omission and sort `EntryData` to ensure stable output fdata profiles. Test Plan: updated pre-aggregated-perf.test
This commit is contained in:
@@ -580,8 +580,10 @@ void DataAggregator::processProfile(BinaryContext &BC) {
|
||||
}
|
||||
}
|
||||
|
||||
for (auto &FuncBranches : NamesToBranches)
|
||||
for (auto &FuncBranches : NamesToBranches) {
|
||||
llvm::stable_sort(FuncBranches.second.Data);
|
||||
llvm::stable_sort(FuncBranches.second.EntryData);
|
||||
}
|
||||
|
||||
for (auto &MemEvents : NamesToMemEvents)
|
||||
llvm::stable_sort(MemEvents.second.Data);
|
||||
|
||||
Reference in New Issue
Block a user