[llvm] [MemProf] Avoid duplicate edges between nodes (PR #113337)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 10:29:39 PDT 2024
================
@@ -1352,6 +1352,12 @@ static void checkNode(const ContextNode<DerivedCCG, FuncTy, CallTy> *Node,
}
assert(NodeContextIds == CalleeEdgeContextIds);
}
+ // Make sure we don't end up with duplicate edges between the same caller and
+ // callee.
+ DenseSet<ContextNode<DerivedCCG, FuncTy, CallTy> *> NodeSet;
----------------
teresajohnson wrote:
Hmm, that actually goes for a bunch of stuff in this function. Note this checking is off by default and only invoked under one of the `-memprof-verify-*` options, so in general it won't add overhead. But in fact I think I should change this into some kind of error that doesn't rely on debug builds, so that it can be utilized for release builds as well. I am going to put this new handling under the ifndef as you suggest, but also add a TODO to make it a non-debug only checking failure.
https://github.com/llvm/llvm-project/pull/113337
More information about the llvm-commits
mailing list