Search in sources :

Example 1 with DeoptProxyNode

use of com.oracle.svm.hosted.nodes.DeoptProxyNode in project graal by oracle.

the class HostedBytecodeParser method build.

@Override
protected void build(FixedWithNextNode startInstruction, FrameStateBuilder startFrameState) {
    super.build(startInstruction, startFrameState);
    /* We never have floating guards in AOT compiled code. */
    getGraph().setGuardsStage(GuardsStage.FIXED_DEOPTS);
    assert !getMethod().isEntryPoint() : "Cannot directly use as entry point, create a call stub";
    if (getMethod().compilationInfo.isDeoptTarget()) {
        /*
             * Remove dangling DeoptProxyNodes which remained after deletion of the corresponding
             * DeoptEntryNodes.
             */
        for (DeoptProxyNode deoptProxy : graph.getNodes(DeoptProxyNode.TYPE)) {
            if (!deoptProxy.hasProxyPoint()) {
                ValueNode originalValue = deoptProxy.getOriginalNode();
                deoptProxy.replaceAtUsagesAndDelete(originalValue);
            }
        }
    }
}
Also used : ValueNode(org.graalvm.compiler.nodes.ValueNode) DeoptProxyNode(com.oracle.svm.hosted.nodes.DeoptProxyNode)

Aggregations

DeoptProxyNode (com.oracle.svm.hosted.nodes.DeoptProxyNode)1 ValueNode (org.graalvm.compiler.nodes.ValueNode)1