[all-commits] [llvm/llvm-project] 4c2980: [llvm-profdata] Stabilize iteration order for Inst...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu Jul 20 18:31:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4c2980c1a3c74bd292c3c9d8d740fa7e053971f8
https://github.com/llvm/llvm-project/commit/4c2980c1a3c74bd292c3c9d8d740fa7e053971f8
Author: Fangrui Song <i at maskray.me>
Date: 2023-07-20 (Thu, 20 Jul 2023)
Changed paths:
M llvm/lib/ProfileData/InstrProfWriter.cpp
M llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
Log Message:
-----------
[llvm-profdata] Stabilize iteration order for InstrProfWriter
If two functions are inserted to the same bucket, their order in the
serialized profile is dependent on StringMap iteration order, which is
not guaranteed to be deterministic.
(https://llvm.org/docs/ProgrammersManual.html#llvm-adt-stringmap-h).
Use a sort like we do in writeText.
More information about the All-commits
mailing list