public abstract class NodeLIRBuilder extends Object implements NodeLIRBuilderTool, LIRGenerationDebugContext
| Modifier and Type | Field and Description | 
|---|---|
| private ValueNode | currentInstruction | 
| private DebugInfoBuilder | debugInfoBuilder | 
| protected LIRGeneratorTool | gen | 
| private ValueNode | lastInstructionPrinted | 
| private Map<Class<? extends Node>,List<MatchStatement>> | matchRules | 
| private NodeMap<Value> | nodeOperands | 
| Constructor and Description | 
|---|
| NodeLIRBuilder(StructuredGraph graph,
              LIRGeneratorTool gen) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | append(LIRInstruction op) | 
| protected DebugInfoBuilder | createDebugInfoBuilder(StructuredGraph graph,
                      NodeValueMap nodeValueMap) | 
| private Value[] | createPhiIn(AbstractMergeNode merge) | 
| private Value[] | createPhiOut(AbstractMergeNode merge,
            AbstractEndNode pred) | 
| void | doBlock(Block block,
       StructuredGraph graph,
       BlockMap<List<Node>> blockMap) | 
| private void | doRoot(ValueNode instr) | 
| void | emitBranch(LogicNode node,
          LabelRef trueSuccessor,
          LabelRef falseSuccessor,
          double trueSuccessorProbability) | 
| void | emitCompareBranch(CompareNode compare,
                 LabelRef trueSuccessor,
                 LabelRef falseSuccessor,
                 double trueSuccessorProbability) | 
| void | emitConditional(ConditionalNode conditional) | 
| Variable | emitConditional(LogicNode node,
               Value trueValue,
               Value falseValue) | 
| void | emitConstantBranch(boolean value,
                  LabelRef trueSuccessorBlock,
                  LabelRef falseSuccessorBlock) | 
| protected abstract void | emitDirectCall(DirectCallTargetNode callTarget,
              Value result,
              Value[] parameters,
              Value[] temps,
              LIRFrameState callState) | 
| void | emitIf(IfNode x) | 
| protected abstract void | emitIndirectCall(IndirectCallTargetNode callTarget,
                Value result,
                Value[] parameters,
                Value[] temps,
                LIRFrameState callState) | 
| void | emitIntegerTestBranch(IntegerTestNode test,
                     LabelRef trueSuccessor,
                     LabelRef falseSuccessor,
                     double trueSuccessorProbability) | 
| void | emitInvoke(Invoke x) | 
| protected void | emitNode(ValueNode node) | 
| private void | emitNullCheckBranch(IsNullNode node,
                   LabelRef trueSuccessor,
                   LabelRef falseSuccessor,
                   double trueSuccessorProbability) | 
| void | emitOverflowCheckBranch(AbstractBeginNode overflowSuccessor,
                       AbstractBeginNode next,
                       Stamp stamp,
                       double probability) | 
| protected void | emitPrologue(StructuredGraph graph) | 
| void | emitSwitch(SwitchNode x)This method tries to create a switch implementation that is optimal for the given switch. | 
| DebugInfoBuilder | getDebugInfoBuilder() | 
| protected LIRKind | getExactPhiKind(PhiNode phi) | 
| private static FrameState | getFrameState(DeoptimizingNode deopt) | 
| LabelRef | getLIRBlock(FixedNode b) | 
| LIRGeneratorTool | getLIRGeneratorTool() | 
| private Value | getOperand(Node node) | 
| protected LIRKind | getPhiKind(PhiNode phi) | 
| Object | getSourceForOperand(Value value) | 
| boolean | hasOperand(Node node) | 
| private static boolean | isPhiInputFromBackedge(PhiNode phi,
                      int index) | 
| protected void | matchComplexExpressions(List<Node> nodes) | 
| private void | moveToPhi(AbstractMergeNode merge,
         AbstractEndNode pred) | 
| protected StandardOp.JumpOp | newJumpOp(LabelRef ref) | 
| Value | operand(Node node)Returns the operand that has been previously initialized by
  setResult(ValueNode, Value)with the result of an instruction. | 
| private Value | operandForPhi(ValuePhiNode phi) | 
| protected abstract boolean | peephole(ValueNode valueNode) | 
| void | setMatchResult(Node x,
              Value operand)Used by the  MatchStatementmachinery to override the generation LIR for some
 ValueNodes. | 
| Value | setResult(ValueNode x,
         Value operand)Associates  operandwith thenodein the current block. | 
| LIRFrameState | state(DeoptimizingNode deopt) | 
| LIRFrameState | stateFor(FrameState state) | 
| LIRFrameState | stateForWithExceptionEdge(FrameState state,
                         LabelRef exceptionEdge) | 
| LIRFrameState | stateWithExceptionEdge(DeoptimizingNode deopt,
                      LabelRef exceptionEdge) | 
| ValueNode | valueForOperand(Value value)Gets the the  ValueNodethat produced avalue. | 
| private static boolean | verifyPHIKind(LIRKind derivedKind,
             LIRKind phiKind) | 
| void | visitEndNode(AbstractEndNode end) | 
| void | visitFullInfopointNode(FullInfopointNode i) | 
| Value[] | visitInvokeArguments(CallingConvention invokeCc,
                    Collection<ValueNode> arguments) | 
| void | visitLoopEnd(LoopEndNode x)Runtime specific classes can override this to insert a safepoint at the end of a loop. | 
| void | visitMerge(AbstractMergeNode x) | 
| void | visitSimpleInfopointNode(SimpleInfopointNode i) | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvisitBreakpointNode, visitSafepointNodegetFromDebugContext, getSourceForOperandFromDebugContextprivate final NodeMap<Value> nodeOperands
private final DebugInfoBuilder debugInfoBuilder
protected final LIRGeneratorTool gen
private ValueNode currentInstruction
private ValueNode lastInstructionPrinted
private Map<Class<? extends Node>,List<MatchStatement>> matchRules
public NodeLIRBuilder(StructuredGraph graph, LIRGeneratorTool gen)
protected DebugInfoBuilder createDebugInfoBuilder(StructuredGraph graph, NodeValueMap nodeValueMap)
public Value operand(Node node)
setResult(ValueNode, Value) with the result of an instruction. It's a code
 generation error to ask for the operand of ValueNode that doesn't have one yet.operand in interface NodeValueMapnode - A node that produces a result value.public boolean hasOperand(Node node)
hasOperand in interface NodeValueMaptrue if there is an operand associated with the node in
         the current block.private Value getOperand(Node node)
public ValueNode valueForOperand(Value value)
NodeValueMapValueNode that produced a value. If the value is not
 associated with a ValueNode null is returned.
 This method is intended for debugging purposes only.valueForOperand in interface NodeValueMappublic Object getSourceForOperand(Value value)
LIRGenerationDebugContextgetSourceForOperand in interface LIRGenerationDebugContextpublic Value setResult(ValueNode x, Value operand)
NodeValueMapoperand with the node in the current block.setResult in interface NodeValueMapoperandpublic void setMatchResult(Node x, Value operand)
MatchStatement machinery to override the generation LIR for some
 ValueNodes.public LabelRef getLIRBlock(FixedNode b)
public final void append(LIRInstruction op)
protected LIRKind getExactPhiKind(PhiNode phi)
private static boolean verifyPHIKind(LIRKind derivedKind, LIRKind phiKind)
private static boolean isPhiInputFromBackedge(PhiNode phi, int index)
private Value[] createPhiIn(AbstractMergeNode merge)
private Value[] createPhiOut(AbstractMergeNode merge, AbstractEndNode pred)
public void doBlock(Block block, StructuredGraph graph, BlockMap<List<Node>> blockMap)
doBlock in interface NodeLIRBuilderToolprotected void matchComplexExpressions(List<Node> nodes)
protected void emitPrologue(StructuredGraph graph)
public void visitMerge(AbstractMergeNode x)
visitMerge in interface NodeLIRBuilderToolpublic void visitEndNode(AbstractEndNode end)
visitEndNode in interface NodeLIRBuilderToolpublic void visitLoopEnd(LoopEndNode x)
visitLoopEnd in interface NodeLIRBuilderToolprivate void moveToPhi(AbstractMergeNode merge, AbstractEndNode pred)
protected StandardOp.JumpOp newJumpOp(LabelRef ref)
protected LIRKind getPhiKind(PhiNode phi)
private Value operandForPhi(ValuePhiNode phi)
public void emitIf(IfNode x)
emitIf in interface NodeLIRBuilderToolpublic void emitBranch(LogicNode node, LabelRef trueSuccessor, LabelRef falseSuccessor, double trueSuccessorProbability)
private void emitNullCheckBranch(IsNullNode node, LabelRef trueSuccessor, LabelRef falseSuccessor, double trueSuccessorProbability)
public void emitCompareBranch(CompareNode compare, LabelRef trueSuccessor, LabelRef falseSuccessor, double trueSuccessorProbability)
public void emitIntegerTestBranch(IntegerTestNode test, LabelRef trueSuccessor, LabelRef falseSuccessor, double trueSuccessorProbability)
public void emitConstantBranch(boolean value, LabelRef trueSuccessorBlock, LabelRef falseSuccessorBlock)
public void emitConditional(ConditionalNode conditional)
emitConditional in interface NodeLIRBuilderToolpublic Variable emitConditional(LogicNode node, Value trueValue, Value falseValue)
public void emitInvoke(Invoke x)
emitInvoke in interface NodeLIRBuilderToolprotected abstract void emitDirectCall(DirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState)
protected abstract void emitIndirectCall(IndirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState)
public Value[] visitInvokeArguments(CallingConvention invokeCc, Collection<ValueNode> arguments)
visitInvokeArguments in interface NodeLIRBuilderToolpublic void emitSwitch(SwitchNode x)
emitSwitch in interface NodeLIRBuilderToolpublic DebugInfoBuilder getDebugInfoBuilder()
private static FrameState getFrameState(DeoptimizingNode deopt)
public LIRFrameState state(DeoptimizingNode deopt)
state in interface NodeLIRBuilderToolpublic LIRFrameState stateWithExceptionEdge(DeoptimizingNode deopt, LabelRef exceptionEdge)
public LIRFrameState stateFor(FrameState state)
public LIRFrameState stateForWithExceptionEdge(FrameState state, LabelRef exceptionEdge)
public void emitOverflowCheckBranch(AbstractBeginNode overflowSuccessor, AbstractBeginNode next, Stamp stamp, double probability)
emitOverflowCheckBranch in interface NodeLIRBuilderToolpublic void visitFullInfopointNode(FullInfopointNode i)
visitFullInfopointNode in interface NodeLIRBuilderToolpublic void visitSimpleInfopointNode(SimpleInfopointNode i)
visitSimpleInfopointNode in interface NodeLIRBuilderToolpublic LIRGeneratorTool getLIRGeneratorTool()
getLIRGeneratorTool in interface NodeLIRBuilderTool