[llvm] [memprof] Teach extractCallsFromIR to look into inline stacks (PR #115441)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 17:16:24 PST 2024


================
@@ -824,11 +824,14 @@ memprof::extractCallsFromIR(Module &M) {
           continue;
 
         StringRef CalleeName = CalledFunction->getName();
-        uint64_t CallerGUID =
-            IndexedMemProfRecord::getGUID(DIL->getSubprogramLinkageName());
-        uint64_t CalleeGUID = IndexedMemProfRecord::getGUID(CalleeName);
-        LineLocation Loc = {GetOffset(DIL), DIL->getColumn()};
-        Calls[CallerGUID].emplace_back(Loc, CalleeGUID);
+        do {
+          uint64_t CallerGUID =
+              IndexedMemProfRecord::getGUID(DIL->getSubprogramLinkageName());
----------------
snehasish wrote:

It's possible some large binaries may not have this flag enabled for all modules but lets see what happens and if necessary relax this in the future.

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


More information about the llvm-commits mailing list