mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add statistic to call graph builder for calls to builtins.
Add a statistic to the new call graph to track calls to builtins (for which we do not have a call graph node or edge). Swift SVN r21465
This commit is contained in:
@@ -17,12 +17,11 @@ using namespace swift;
|
||||
|
||||
#define DEBUG_TYPE "call-graph"
|
||||
|
||||
STATISTIC(NumCallGraphNodes,
|
||||
"# of call graph nodes created");
|
||||
STATISTIC(NumCallSitesWithEdges,
|
||||
"# of call sites with edges");
|
||||
STATISTIC(NumCallGraphNodes, "# of call graph nodes created");
|
||||
STATISTIC(NumCallSitesWithEdges, "# of call sites with edges");
|
||||
STATISTIC(NumCallSitesWithoutEdges,
|
||||
"# of call sites without edges");
|
||||
"# of non-builtin call sites without call graph edges");
|
||||
STATISTIC(NumCallSitesOfBuiltins, "# of call sites calling builtins");
|
||||
|
||||
CallGraph::CallGraph(SILModule *M, bool completeModule) {
|
||||
// Build the initial call graph by creating a node for each
|
||||
@@ -120,7 +119,11 @@ void CallGraph::addEdgesForApply(ApplyInst *AI, CallGraphNode *CallerNode) {
|
||||
break;
|
||||
}
|
||||
|
||||
case ValueKind::BuiltinFunctionRefInst:
|
||||
case ValueKind::BuiltinFunctionRefInst: {
|
||||
++NumCallSitesOfBuiltins;
|
||||
break;
|
||||
}
|
||||
|
||||
case ValueKind::PartialApplyInst:
|
||||
case ValueKind::ClassMethodInst:
|
||||
case ValueKind::ProtocolMethodInst:
|
||||
|
||||
Reference in New Issue
Block a user