public class LoweringPhase extends BasePhase<PhaseContext>
Lowerable
nodes to do their lowering.Modifier and Type | Class and Description |
---|---|
(package private) static class |
LoweringPhase.DummyGuardHandle |
static class |
LoweringPhase.Frame<T extends LoweringPhase.Frame<?>> |
(package private) class |
LoweringPhase.LoweringToolImpl |
(package private) static class |
LoweringPhase.ProcessBlockState |
private class |
LoweringPhase.Round |
Modifier and Type | Field and Description |
---|---|
private CanonicalizerPhase |
canonicalizer |
private LoweringTool.LoweringStage |
loweringStage |
BEFORE_PHASE_DUMP_LEVEL, PHASE_DUMP_LEVEL
Constructor and Description |
---|
LoweringPhase(CanonicalizerPhase canonicalizer,
LoweringTool.LoweringStage loweringStage) |
Modifier and Type | Method and Description |
---|---|
private boolean |
checkPostLowering(StructuredGraph graph,
PhaseContext context)
Checks that second lowering of a given graph did not introduce any new nodes.
|
private static boolean |
checkPostNodeLowering(Node node,
LoweringPhase.LoweringToolImpl loweringTool,
Graph.Mark preLoweringMark,
Collection<Node> unscheduledUsages)
Checks that lowering of a given node did not introduce any new
Lowerable nodes that
could be lowered in the current LoweringPhase . |
private void |
lower(StructuredGraph graph,
PhaseContext context,
int i) |
static void |
processBlock(LoweringPhase.Frame<?> rootFrame)
This state-machine resembles the following recursion:
|
protected void |
run(StructuredGraph graph,
PhaseContext context) |
apply, apply, createName, getName
private final CanonicalizerPhase canonicalizer
private final LoweringTool.LoweringStage loweringStage
public LoweringPhase(CanonicalizerPhase canonicalizer, LoweringTool.LoweringStage loweringStage)
private boolean checkPostLowering(StructuredGraph graph, PhaseContext context)
graph
- a graph that was just loweredAssertionError
- if the check failsprotected void run(StructuredGraph graph, PhaseContext context)
run
in class BasePhase<PhaseContext>
private void lower(StructuredGraph graph, PhaseContext context, int i)
private static boolean checkPostNodeLowering(Node node, LoweringPhase.LoweringToolImpl loweringTool, Graph.Mark preLoweringMark, Collection<Node> unscheduledUsages)
Lowerable
nodes that
could be lowered in the current LoweringPhase
. Such nodes must be recursively lowered
as part of lowering node
.node
- a node that was just loweredpreLoweringMark
- the graph mark before node
was loweredunscheduledUsages
- set of node
's usages that were unscheduled before it was
loweredAssertionError
- if the check failspublic static void processBlock(LoweringPhase.Frame<?> rootFrame)
void processBlock(Block block) { preprocess(); // Process always reached block first. Block alwaysReachedBlock = block.getPostdominator(); if (alwaysReachedBlock != null && alwaysReachedBlock.getDominator() == block) { processBlock(alwaysReachedBlock); } // Now go for the other dominators. for (Block dominated : block.getDominated()) { if (dominated != alwaysReachedBlock) { assert dominated.getDominator() == block; processBlock(dominated); } } postprocess(); }This is necessary, as the recursive implementation quickly exceed the stack depth on SPARC.
rootFrame
- contains the starting block.