Search in sources :

Example 1 with BeginStateSplitNode

use of org.graalvm.compiler.nodes.BeginStateSplitNode in project graal by oracle.

the class BytecodeParser method createBlockTarget.

/**
 * Returns a block begin node with the specified state. If the specified probability is 0, the
 * block deoptimizes immediately.
 */
private AbstractBeginNode createBlockTarget(double probability, BciBlock block, FrameStateBuilder stateAfter) {
    FixedNode target = createTarget(probability, block, stateAfter);
    AbstractBeginNode begin = BeginNode.begin(target);
    assert !(target instanceof DeoptimizeNode && begin instanceof BeginStateSplitNode && ((BeginStateSplitNode) begin).stateAfter() != null) : "We are not allowed to set the stateAfter of the begin node," + " because we have to deoptimize to a bci _before_ the actual if, so that the interpreter can update the profiling information.";
    return begin;
}
Also used : DeoptimizeNode(org.graalvm.compiler.nodes.DeoptimizeNode) FixedNode(org.graalvm.compiler.nodes.FixedNode) BeginStateSplitNode(org.graalvm.compiler.nodes.BeginStateSplitNode) AbstractBeginNode(org.graalvm.compiler.nodes.AbstractBeginNode)

Aggregations

AbstractBeginNode (org.graalvm.compiler.nodes.AbstractBeginNode)1 BeginStateSplitNode (org.graalvm.compiler.nodes.BeginStateSplitNode)1 DeoptimizeNode (org.graalvm.compiler.nodes.DeoptimizeNode)1 FixedNode (org.graalvm.compiler.nodes.FixedNode)1