================
@@ -61,6 +62,7 @@ class CallGraph : public DynamicRecursiveASTVisitor {
///
/// Recursively walks the declaration to find all the dependent Decls as
well.
void addToCallGraph(Decl *D) {
+ llvm::TimeTraceScope TimeProfile("AddToCallGraph");
----------------
Xazax-hun wrote:
I am not 100% sure if this is the right solution here. There are some uses of
`CallGraph` that would call the `addToCallGraph` in a loop with a select set of
declarations instead of once with the TU. In those use cases it might be better
to have one scope before that loop rather than have it inside this function.
One potential solution I could see is checking if those use cases could be
refactored to use another API that takes an `ArrayRef` of decls that has the
loop inside this new API and has a scope for the whole loop.
https://github.com/llvm/llvm-project/pull/174717
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits