[llvm] 6c3aa62 - [MC][NFC] Use std::map for AddressProbesMap
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 21:00:29 PDT 2024
Author: Amir Ayupov
Date: 2024-07-18T21:00:26-07:00
New Revision: 6c3aa626b28d60411b14c593f3e0443cf37fc84d
URL: https://github.com/llvm/llvm-project/commit/6c3aa626b28d60411b14c593f3e0443cf37fc84d
DIFF: https://github.com/llvm/llvm-project/commit/6c3aa626b28d60411b14c593f3e0443cf37fc84d.diff
LOG: [MC][NFC] Use std::map for AddressProbesMap
AddressProbesMap is keyed by binary addresses, and it makes sense to
treat them as ordered. This also enables slicing by binary function/
binary basic block, to be used in BOLT
(https://github.com/llvm/llvm-project/pull/99554).
Test Plan: NFC
Reviewers: wlei-llvm
Reviewed By: wlei-llvm
Pull Request: https://github.com/llvm/llvm-project/pull/99553
Added:
Modified:
llvm/include/llvm/MC/MCPseudoProbe.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/MC/MCPseudoProbe.h b/llvm/include/llvm/MC/MCPseudoProbe.h
index 4d82da70f3df8..5344dea4141b3 100644
--- a/llvm/include/llvm/MC/MCPseudoProbe.h
+++ b/llvm/include/llvm/MC/MCPseudoProbe.h
@@ -61,6 +61,7 @@
#include "llvm/IR/PseudoProbe.h"
#include "llvm/Support/ErrorOr.h"
#include <list>
+#include <map>
#include <memory>
#include <string>
#include <tuple>
@@ -102,8 +103,7 @@ using MCPseudoProbeInlineStack = SmallVector<InlineSite, 8>;
using GUIDProbeFunctionMap =
std::unordered_map<uint64_t, MCPseudoProbeFuncDesc>;
// Address to pseudo probes map.
-using AddressProbesMap =
- std::unordered_map<uint64_t, std::list<MCDecodedPseudoProbe>>;
+using AddressProbesMap = std::map<uint64_t, std::list<MCDecodedPseudoProbe>>;
class MCDecodedPseudoProbeInlineTree;
More information about the llvm-commits
mailing list