summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 8f23e31a79c..7984292cb0c 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -3290,21 +3290,11 @@ void ModuleBitcodeWriter::writePerModuleFunctionSummaryRecord(
NameVals.push_back(FS->instCount());
NameVals.push_back(FS->refs().size());
- unsigned SizeBeforeRefs = NameVals.size();
for (auto &RI : FS->refs())
NameVals.push_back(VE.getValueID(RI.getValue()));
- // Sort the refs for determinism output, the vector returned by FS->refs() has
- // been initialized from a DenseSet.
- std::sort(NameVals.begin() + SizeBeforeRefs, NameVals.end());
- std::vector<FunctionSummary::EdgeTy> Calls = FS->calls();
- std::sort(Calls.begin(), Calls.end(),
- [this](const FunctionSummary::EdgeTy &L,
- const FunctionSummary::EdgeTy &R) {
- return getValueId(L.first) < getValueId(R.first);
- });
bool HasProfileData = F.getEntryCount().hasValue();
- for (auto &ECI : Calls) {
+ for (auto &ECI : FS->calls()) {
NameVals.push_back(getValueId(ECI.first));
if (HasProfileData)
NameVals.push_back(static_cast<uint8_t>(ECI.second.Hotness));
OpenPOWER on IntegriCloud