[llvm] [memprof] Add computeUndriftMap (PR #116478)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 13:28:10 PST 2024
================
@@ -66,6 +67,21 @@ namespace memprof {
DenseMap<uint64_t, SmallVector<CallEdgeTy, 0>>
extractCallsFromIR(Module &M, const TargetLibraryInfo &TLI);
+struct LineLocationHash {
+ uint64_t operator()(const LineLocation &Loc) const {
+ return Loc.getHashCode();
+ }
+};
+
+using LocToLocMap =
+ std::unordered_map<LineLocation, LineLocation, LineLocationHash>;
----------------
snehasish wrote:
Any reason not to use a densemap?
https://github.com/llvm/llvm-project/pull/116478
More information about the llvm-commits
mailing list