[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


================
@@ -856,6 +857,35 @@ memprof::extractCallsFromIR(Module &M, const TargetLibraryInfo &TLI) {
   return Calls;
 }
 
+DenseMap<uint64_t, LocToLocMap>
+memprof::computeUndriftMap(Module &M, IndexedInstrProfReader *MemProfReader,
+                           const TargetLibraryInfo &TLI) {
+  DenseMap<uint64_t, LocToLocMap> UndriftMaps;
+
+  auto CallsFromProfile = MemProfReader->getMemProfCallerCalleePairs();
+  auto CallsFromIR = extractCallsFromIR(M, TLI);
----------------
snehasish wrote:

I think spelling out the types here would help the reader.

https://github.com/llvm/llvm-project/pull/116478


More information about the llvm-commits mailing list