use of com.oracle.svm.core.graal.nodes.DeoptTestNode in project graal by oracle.
the class CompileQueue method insertDeoptTests.
/**
* Inserts a call to {@link DeoptTester#deoptTest} right after FixedWithNextNode StateSplits.
*
* @param method method that is being augmented with deopt test calls
* @param graph The graph of a deoptimizable method or the corresponding deopt target method.
*/
private static void insertDeoptTests(HostedMethod method, StructuredGraph graph) {
for (Node node : graph.getNodes()) {
if (node instanceof FixedWithNextNode && node instanceof StateSplit && !(node instanceof InvokeNode) && !(node instanceof ForeignCallNode) && !(node instanceof DeoptTestNode) && !(method.isSynchronized() && node instanceof StartNode)) {
FixedWithNextNode fixedWithNext = (FixedWithNextNode) node;
FixedNode next = fixedWithNext.next();
DeoptTestNode testNode = graph.add(new DeoptTestNode());
fixedWithNext.setNext(null);
testNode.setNext(next);
fixedWithNext.setNext(testNode);
}
}
}
Aggregations