[llvm] [MemProf] Prune unneeded non-cold contexts (PR #124823)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 29 07:25:40 PST 2025
================
@@ -337,10 +371,16 @@ bool CallStackTrie::buildAndAttachMIBMetadata(CallBase *CI) {
MIBCallStack.push_back(AllocStackId);
std::vector<Metadata *> MIBNodes;
assert(!Alloc->Callers.empty() && "addCallStack has not been called yet");
- // The last parameter is meant to say whether the callee of the given node
- // has more than one caller. Here the node being passed in is the alloc
- // and it has no callees. So it's false.
- if (buildMIBNodes(Alloc, Ctx, MIBCallStack, MIBNodes, false)) {
+ // The CalleeHasAmbiguousCallerContext flag is meant to say whether the
+ // callee of the given node has more than one caller. Here the node being
+ // passed in is the alloc and it has no callees. So it's false.
+ // Similarly, the last parameter is meant to say whether the callee of the
+ // given node is the deepest point where we have ambiguous alloc types, which
+ // is also false as the alloc has no callees.
+ bool DeepestAmbiguousAllocType = true;
----------------
teresajohnson wrote:
I started to do this but it made the uses more complicated inside buildMIBNodes and I think it ends up more complicated and hard to reason about overall. So I'd prefer to leave as-is.
https://github.com/llvm/llvm-project/pull/124823
More information about the llvm-commits
mailing list