public class ConvertDeoptimizeToGuardPhase extends BasePhase<PhaseContext>
DeoptimizeNode
and replace their
ControlSplitNodes
with FixedGuardNodes
.
This is useful because FixedGuardNodes
will be lowered to
GuardNodes
which can later be optimized more aggressively than control-flow
constructs.
This is currently only done for branches that start from a IfNode
. If it encounters a
branch starting at an other kind of ControlSplitNode
, it will only bring the
DeoptimizeNode
as close to the ControlSplitNode
as possible.Modifier and Type | Field and Description |
---|---|
private SimplifierTool |
simplifierTool |
BEFORE_PHASE_DUMP_LEVEL, PHASE_DUMP_LEVEL
Constructor and Description |
---|
ConvertDeoptimizeToGuardPhase() |
Modifier and Type | Method and Description |
---|---|
private static AbstractBeginNode |
findBeginNode(FixedNode startNode) |
private void |
processFixedGuardAndMerge(FixedGuardNode fixedGuard,
PhaseContext context,
CompareNode compare,
ValueNode x,
ValuePhiNode xPhi,
ValueNode y,
ValuePhiNode yPhi,
AbstractMergeNode merge) |
private void |
processFixedGuardAndPhis(FixedGuardNode fixedGuard,
PhaseContext context,
CompareNode compare,
ValueNode x,
ValuePhiNode xPhi,
ValueNode y,
ValuePhiNode yPhi) |
protected void |
run(StructuredGraph graph,
PhaseContext context) |
private void |
trySplitFixedGuard(FixedGuardNode fixedGuard,
PhaseContext context) |
private void |
visitDeoptBegin(AbstractBeginNode deoptBegin,
DeoptimizationAction deoptAction,
DeoptimizationReason deoptReason,
JavaConstant speculation,
StructuredGraph graph) |
apply, apply, createName, getName
private SimplifierTool simplifierTool
public ConvertDeoptimizeToGuardPhase()
private static AbstractBeginNode findBeginNode(FixedNode startNode)
protected void run(StructuredGraph graph, PhaseContext context)
run
in class BasePhase<PhaseContext>
private void trySplitFixedGuard(FixedGuardNode fixedGuard, PhaseContext context)
private void processFixedGuardAndPhis(FixedGuardNode fixedGuard, PhaseContext context, CompareNode compare, ValueNode x, ValuePhiNode xPhi, ValueNode y, ValuePhiNode yPhi)
private void processFixedGuardAndMerge(FixedGuardNode fixedGuard, PhaseContext context, CompareNode compare, ValueNode x, ValuePhiNode xPhi, ValueNode y, ValuePhiNode yPhi, AbstractMergeNode merge)
private void visitDeoptBegin(AbstractBeginNode deoptBegin, DeoptimizationAction deoptAction, DeoptimizationReason deoptReason, JavaConstant speculation, StructuredGraph graph)