public abstract class NodeLIRBuilder extends Object implements NodeLIRBuilderTool, LIRGenerationDebugContext
| Modifier and Type | Field and Description |
|---|---|
protected LIRGenerator |
gen |
| Constructor and Description |
|---|
NodeLIRBuilder(StructuredGraph graph,
LIRGeneratorTool gen,
NodeMatchRules nodeMatchRules) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(LIRInstruction op) |
protected DebugInfoBuilder |
createDebugInfoBuilder(StructuredGraph graph,
NodeValueMap nodeValueMap) |
void |
doBlock(Block block,
StructuredGraph graph,
BlockMap<List<Node>> blockMap) |
void |
doBlockPrologue(Block block,
OptionValues options) |
void |
emitBranch(LogicNode node,
LabelRef trueSuccessor,
LabelRef falseSuccessor,
double trueSuccessorProbability) |
void |
emitConditional(ConditionalNode conditional) |
Variable |
emitConditional(LogicNode node,
Value trueValue,
Value falseValue) |
protected abstract void |
emitDirectCall(DirectCallTargetNode callTarget,
Value result,
Value[] parameters,
Value[] temps,
LIRFrameState callState) |
void |
emitForeignCall(ForeignCall x) |
void |
emitIf(IfNode x) |
protected abstract void |
emitIndirectCall(IndirectCallTargetNode callTarget,
Value result,
Value[] parameters,
Value[] temps,
LIRFrameState callState) |
void |
emitInvoke(Invoke x) |
protected void |
emitInvoke(LoweredCallTargetNode callTarget,
Value[] parameters,
LIRFrameState callState,
Value result) |
protected void |
emitNode(ValueNode node) |
void |
emitOverflowCheckBranch(AbstractBeginNode overflowSuccessor,
AbstractBeginNode next,
Stamp stamp,
double probability) |
protected void |
emitPrologue(StructuredGraph graph) |
void |
emitReadExceptionObject(ValueNode node) |
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) |
LabelRef |
getLIRBlock(FixedNode b) |
LIRGenerator |
getLIRGeneratorTool() |
NodeMatchRules |
getNodeMatchRules() |
protected LIRKind |
getPhiKind(PhiNode phi) |
Object |
getSourceForOperand(Value value)
Gets an object that represents the source of an
LIR operand in a higher
representation. |
boolean |
hasOperand(Node node) |
void |
incrementSharedMatchCount(Node node)
Track how many users have consumed a sharedable match and disable emission of the value if
all users have consumed it.
|
void |
matchBlock(Block block,
StructuredGraph.ScheduleResult schedule) |
protected void |
matchComplexExpressions(Block block,
StructuredGraph.ScheduleResult schedule) |
protected StandardOp.JumpOp |
newJumpOp(LabelRef ref) |
Value |
operand(Node node)
Returns the operand that has been previously initialized by
NodeLIRBuilder.setResult(ValueNode, Value) with the result of an instruction. |
protected abstract boolean |
peephole(ValueNode valueNode) |
protected void |
prologAssignParams(CallingConvention incomingArguments,
Value[] params) |
protected void |
prologSetParameterNodes(StructuredGraph graph,
Value[] params) |
void |
setMatchResult(Node x,
Value operand)
Used by the
MatchStatement machinery to override the generation LIR for some
ValueNodes. |
Value |
setResult(ValueNode x,
Value operand)
Associates
operand with the node in the current block. |
LIRFrameState |
state(DeoptimizingNode deopt) |
LIRFrameState |
stateFor(NodeWithState deopt,
FrameState state) |
LIRFrameState |
stateForWithExceptionEdge(NodeWithState deopt,
FrameState state,
LabelRef exceptionEdge) |
LIRFrameState |
stateWithExceptionEdge(DeoptimizingNode deopt,
LabelRef exceptionEdge) |
ValueNode |
valueForOperand(Value value)
Gets the
ValueNode that produced a value. |
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) |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOptions, lookupGraalStub, visitBreakpointNode, visitSafepointNodegetFromDebugContext, getSourceForOperandFromDebugContextprotected final LIRGenerator gen
public NodeLIRBuilder(StructuredGraph graph, LIRGeneratorTool gen, NodeMatchRules nodeMatchRules)
public NodeMatchRules getNodeMatchRules()
protected DebugInfoBuilder createDebugInfoBuilder(StructuredGraph graph, NodeValueMap nodeValueMap)
public Value operand(Node node)
NodeLIRBuilder.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.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)
LIRGenerationDebugContextLIR operand in a higher
representation.getSourceForOperand 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 void incrementSharedMatchCount(Node node)
public final void append(LIRInstruction op)
public void doBlockPrologue(Block block, OptionValues options)
public void doBlock(Block block, StructuredGraph graph, BlockMap<List<Node>> blockMap)
doBlock in interface NodeLIRBuilderToolpublic void matchBlock(Block block, StructuredGraph.ScheduleResult schedule)
protected void matchComplexExpressions(Block block, StructuredGraph.ScheduleResult schedule)
protected abstract boolean peephole(ValueNode valueNode)
protected void emitNode(ValueNode node)
protected void emitPrologue(StructuredGraph graph)
protected final void prologAssignParams(CallingConvention incomingArguments,
Value[] params)
protected void prologSetParameterNodes(StructuredGraph graph, Value[] params)
public void visitMerge(AbstractMergeNode x)
visitMerge in interface NodeLIRBuilderToolpublic void visitEndNode(AbstractEndNode end)
visitEndNode in interface NodeLIRBuilderToolpublic void visitLoopEnd(LoopEndNode x)
visitLoopEnd in interface NodeLIRBuilderToolprotected StandardOp.JumpOp newJumpOp(LabelRef ref)
public void emitIf(IfNode x)
emitIf in interface NodeLIRBuilderToolpublic void emitBranch(LogicNode node, LabelRef trueSuccessor, LabelRef falseSuccessor, double trueSuccessorProbability)
public void emitConditional(ConditionalNode conditional)
emitConditional in interface NodeLIRBuilderToolpublic void emitInvoke(Invoke x)
emitInvoke in interface NodeLIRBuilderToolprotected void emitInvoke(LoweredCallTargetNode callTarget, Value[] parameters, LIRFrameState callState, Value result)
public void emitForeignCall(ForeignCall x)
emitForeignCall 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)
public void emitSwitch(SwitchNode x)
emitSwitch in interface NodeLIRBuilderToolpublic DebugInfoBuilder getDebugInfoBuilder()
public LIRFrameState state(DeoptimizingNode deopt)
state in interface NodeLIRBuilderToolpublic LIRFrameState stateWithExceptionEdge(DeoptimizingNode deopt, LabelRef exceptionEdge)
public LIRFrameState stateFor(NodeWithState deopt, FrameState state)
public LIRFrameState stateForWithExceptionEdge(NodeWithState deopt, 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 LIRGenerator getLIRGeneratorTool()
getLIRGeneratorTool in interface NodeLIRBuilderToolpublic void emitReadExceptionObject(ValueNode node)
emitReadExceptionObject in interface NodeLIRBuilderTool