[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:
Igor Chevdar
2022-10-31 08:51:58 +02:00
committed by Space Team
parent 8a03313818
commit 8ed6c1a06c
@@ -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))
}
}
}
}