[llvm-branch-commits] [llvm] [MC][NFC] Reduce Address2ProbesMap size (PR #102904)
Amir Ayupov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Aug 16 03:07:39 PDT 2024
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/102904
>From 3ffb03f8e4bcb2fa235ae989320c466af4a3cda8 Mon Sep 17 00:00:00 2001
From: Amir Ayupov <aaupov at fb.com>
Date: Mon, 12 Aug 2024 14:40:57 -0700
Subject: [PATCH] stable_sort
Created using spr 1.3.4
---
llvm/lib/MC/MCPseudoProbe.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/MC/MCPseudoProbe.cpp b/llvm/lib/MC/MCPseudoProbe.cpp
index 45fe95e176ff24..1c81630dda4dd9 100644
--- a/llvm/lib/MC/MCPseudoProbe.cpp
+++ b/llvm/lib/MC/MCPseudoProbe.cpp
@@ -638,7 +638,7 @@ bool MCPseudoProbeDecoder::buildAddress2ProbeMap(
std::vector<std::pair<uint64_t, uint32_t>> SortedA2P(ProbeCount);
for (const auto &[I, Probe] : llvm::enumerate(PseudoProbeVec))
SortedA2P[I] = {Probe.getAddress(), I};
- llvm::sort(SortedA2P, llvm::less_first());
+ llvm::stable_sort(SortedA2P, llvm::less_first());
Address2ProbesMap.reserve(ProbeCount);
for (const uint32_t I : llvm::make_second_range(SortedA2P))
Address2ProbesMap.emplace_back(PseudoProbeVec[I]);
More information about the llvm-branch-commits
mailing list