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

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 08:41:54 PST 2024


================
@@ -824,11 +824,22 @@ 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);
+        if (DIL->getInlinedAt()) {
+          for (; DIL; DIL = DIL->getInlinedAt()) {
----------------
kazutakahirata wrote:

Thank you for pointing this out!  Addressed in the latest revision.

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


More information about the llvm-commits mailing list