public static class ConditionalEliminationPhase.Instance extends Object implements ControlFlowGraph.RecursiveVisitor<ConditionalEliminationUtil.Marks>
| Modifier and Type | Field and Description |
|---|---|
protected BlockMap<List<Node>> |
blockToNodes |
protected ArrayDeque<ConditionalEliminationUtil.GuardedCondition> |
conditions |
protected DebugContext |
debug |
protected StructuredGraph |
graph |
protected NodeMap<ConditionalEliminationUtil.InfoElement> |
map |
protected org.graalvm.collections.EconomicMap<MergeNode,org.graalvm.collections.EconomicMap<ValuePhiNode,org.graalvm.compiler.phases.common.ConditionalEliminationPhase.PhiInfoElement>> |
mergeMaps |
protected NodeMap<Block> |
nodeToBlock |
protected CanonicalizerTool |
tool |
protected NodeStack |
undoOperations |
| Constructor and Description |
|---|
Instance(StructuredGraph graph,
BlockMap<List<Node>> blockToNodes,
NodeMap<Block> nodeToBlock,
CoreProviders context) |
| Modifier and Type | Method and Description |
|---|---|
ConditionalEliminationUtil.Marks |
enter(Block block) |
void |
exit(Block b,
ConditionalEliminationUtil.Marks marks) |
protected boolean |
foldGuard(DeoptimizingGuard thisGuard,
DeoptimizingGuard otherGuard,
boolean outcome,
Stamp guardedValueStamp,
ConditionalEliminationUtil.GuardRewirer rewireGuardFunction) |
protected boolean |
foldPendingTest(DeoptimizingGuard thisGuard,
ValueNode original,
Stamp newStamp,
ConditionalEliminationUtil.GuardRewirer rewireGuardFunction)
Look for a preceding guard whose condition is implied by
thisGuard. |
protected ConditionalEliminationUtil.InfoElement |
getInfoElements(ValueNode proxiedValue) |
protected void |
introducePisForPhis(MergeNode merge) |
protected void |
processAbstractBegin(AbstractBeginNode beginNode) |
protected void |
processConditionAnchor(ConditionAnchorNode node) |
protected void |
processEnd(EndNode end) |
protected void |
processFixedGuard(FixedGuardNode node) |
protected void |
processGuard(GuardNode node) |
protected void |
processIf(IfNode node) |
protected void |
processIntegerSwitch(AbstractBeginNode beginNode,
IntegerSwitchNode integerSwitchNode) |
protected void |
processNode(Node node) |
protected void |
processNodes(Block block) |
protected void |
processTypeSwitch(AbstractBeginNode beginNode,
TypeSwitchNode typeSwitch) |
protected void |
registerCondition(LogicNode condition,
boolean negated,
GuardingNode guard) |
protected void |
registerNewCondition(LogicNode condition,
boolean negated,
GuardingNode guard) |
protected void |
registerNewStamp(ValueNode maybeProxiedValue,
Stamp newStamp,
GuardingNode guard) |
protected void |
registerNewStamp(ValueNode maybeProxiedValue,
Stamp newStamp,
GuardingNode guard,
boolean propagateThroughPis) |
protected boolean |
tryProveGuardCondition(DeoptimizingGuard thisGuard,
LogicNode node,
ConditionalEliminationUtil.GuardRewirer rewireGuardFunction) |
protected final NodeMap<ConditionalEliminationUtil.InfoElement> map
protected final CanonicalizerTool tool
protected final NodeStack undoOperations
protected final StructuredGraph graph
protected final DebugContext debug
protected final org.graalvm.collections.EconomicMap<MergeNode,org.graalvm.collections.EconomicMap<ValuePhiNode,org.graalvm.compiler.phases.common.ConditionalEliminationPhase.PhiInfoElement>> mergeMaps
protected final ArrayDeque<ConditionalEliminationUtil.GuardedCondition> conditions
public Instance(StructuredGraph graph, BlockMap<List<Node>> blockToNodes, NodeMap<Block> nodeToBlock, CoreProviders context)
protected void processConditionAnchor(ConditionAnchorNode node)
protected void processGuard(GuardNode node)
protected void processFixedGuard(FixedGuardNode node)
protected void processIf(IfNode node)
public ConditionalEliminationUtil.Marks enter(Block block)
enter in interface ControlFlowGraph.RecursiveVisitor<ConditionalEliminationUtil.Marks>protected void processNodes(Block block)
protected void processNode(Node node)
protected void introducePisForPhis(MergeNode merge)
protected void processEnd(EndNode end)
protected void registerNewCondition(LogicNode condition, boolean negated, GuardingNode guard)
protected boolean foldPendingTest(DeoptimizingGuard thisGuard, ValueNode original, Stamp newStamp, ConditionalEliminationUtil.GuardRewirer rewireGuardFunction)
thisGuard. If we find
one, try to move this guard just above that preceding guard so that we can fold it:
guard(C1); // preceding guard
...
guard(C2); // thisGuard
If C2 => C1, transform to:
guard(C2);
...
protected boolean foldGuard(DeoptimizingGuard thisGuard, DeoptimizingGuard otherGuard, boolean outcome, Stamp guardedValueStamp, ConditionalEliminationUtil.GuardRewirer rewireGuardFunction)
protected boolean tryProveGuardCondition(DeoptimizingGuard thisGuard, LogicNode node, ConditionalEliminationUtil.GuardRewirer rewireGuardFunction)
protected void registerCondition(LogicNode condition, boolean negated, GuardingNode guard)
protected ConditionalEliminationUtil.InfoElement getInfoElements(ValueNode proxiedValue)
protected void registerNewStamp(ValueNode maybeProxiedValue, Stamp newStamp, GuardingNode guard)
protected void registerNewStamp(ValueNode maybeProxiedValue, Stamp newStamp, GuardingNode guard, boolean propagateThroughPis)
protected void processAbstractBegin(AbstractBeginNode beginNode)
protected void processIntegerSwitch(AbstractBeginNode beginNode, IntegerSwitchNode integerSwitchNode)
protected void processTypeSwitch(AbstractBeginNode beginNode, TypeSwitchNode typeSwitch)
public void exit(Block b, ConditionalEliminationUtil.Marks marks)
exit in interface ControlFlowGraph.RecursiveVisitor<ConditionalEliminationUtil.Marks>