[PATCH] D152731: [BOLT] Sort BranchData in DataAggregator
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 12:09:12 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG224e4cc516c7: [BOLT] Sort BranchData in DataAggregator (authored by Amir).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152731/new/
https://reviews.llvm.org/D152731
Files:
bolt/lib/Profile/DataAggregator.cpp
bolt/test/runtime/X86/fdata-escape-chars.ll
Index: bolt/test/runtime/X86/fdata-escape-chars.ll
===================================================================
--- bolt/test/runtime/X86/fdata-escape-chars.ll
+++ bolt/test/runtime/X86/fdata-escape-chars.ll
@@ -88,8 +88,8 @@
; INSTR_CHECK: {{([[:xdigit:]]+)}}: callq "symb whitespace" # Count: 1
; PREAGR_FDATA_CHECK: 1 main 0 1 static\ symb\ backslash\\/1 0 0 1
-; PREAGR_FDATA_CHECK: 1 main 0 1 symb\ whitespace 0 0 1
; PREAGR_FDATA_CHECK: 1 main 0 1 symb\ backslash\\ 0 0 2
+; PREAGR_FDATA_CHECK: 1 main 0 1 symb\ whitespace 0 0 1
; PREAGR_FDATA_CHECK: 1 static\ symb\ backslash\\/1 0 1 symb\ whitespace 0 0 1
; PREAGR_FDATA_CHECK: 1 symb\ backslash\\ 0 1 symb\ whitespace 0 0 2
Index: bolt/lib/Profile/DataAggregator.cpp
===================================================================
--- bolt/lib/Profile/DataAggregator.cpp
+++ bolt/lib/Profile/DataAggregator.cpp
@@ -624,6 +624,12 @@
BF.markProfiled(Flags);
}
+ for (auto &FuncBranches : NamesToBranches)
+ llvm::stable_sort(FuncBranches.second.Data);
+
+ for (auto &MemEvents : NamesToMemEvents)
+ llvm::stable_sort(MemEvents.second.Data);
+
// Release intermediate storage.
clear(BranchLBRs);
clear(FallthroughLBRs);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152731.531866.patch
Type: text/x-patch
Size: 1229 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230615/a536d4fb/attachment.bin>
More information about the llvm-commits
mailing list