[K/N][optmz] Fixed bug with losing a part of the call graph
The bug might have happened on a failed to have been devirtualized callsite as some of the potential callees might have been lost. The commit solves the issue rather conservatively by simply adding all those potential callees to the root set.
This commit is contained in:
+6
@@ -193,6 +193,12 @@ internal class CallGraphBuilder(
|
||||
else {
|
||||
val callSite = CallGraphNode.CallSite(call, true, call.callee)
|
||||
callGraph.addEdge(symbol, callSite)
|
||||
|
||||
allPossibleCallees.forEach {
|
||||
val callee = moduleDFG.functions[it]
|
||||
if (callee != null)
|
||||
functionStack.push(HandleFunctionParams(null, callee))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user