Class BinaryNode
java.lang.Object
jdk.graal.compiler.graph.Node
jdk.graal.compiler.nodes.ValueNode
jdk.graal.compiler.nodes.calc.FloatingNode
jdk.graal.compiler.nodes.calc.BinaryNode
- All Implemented Interfaces:
Cloneable
,Formattable
,Node.ValueNumberable
,CanonicalizableMarker
,Canonicalizable
,Canonicalizable.Binary<ValueNode>
,ValueNodeInterface
- Direct Known Subclasses:
AbstractNormalizeCompareNode
,BinaryArithmeticNode
,BinaryMathIntrinsicNode
,CopySignNode
,ShiftNode
The
BinaryNode
class is the base of arithmetic and logic operations with two inputs.-
Nested Class Summary
Nested classes/interfaces inherited from class jdk.graal.compiler.graph.Node
Node.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectInputChangedCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.InputsChangedCanonicalization, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberable
Nested classes/interfaces inherited from interface jdk.graal.compiler.nodes.spi.Canonicalizable
Canonicalizable.Binary<T extends Node>, Canonicalizable.BinaryCommutative<T extends Node>, Canonicalizable.Ternary<T extends Node>, Canonicalizable.Unary<T extends Node>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NodeClass
<BinaryNode> protected ValueNode
protected ValueNode
Fields inherited from class jdk.graal.compiler.nodes.ValueNode
EMPTY_ARRAY, stamp
Fields inherited from class jdk.graal.compiler.graph.Node
NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithOnlyInputEdges
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BinaryNode
(NodeClass<? extends BinaryNode> c, Stamp stamp, ValueNode x, ValueNode y) Creates a new BinaryNode instance. -
Method Summary
Modifier and TypeMethodDescriptionabstract Stamp
Compute an improved for this node using the passed in stamps.getX()
Gets the current value of the input, so that callingCanonicalizable.Binary.canonical(CanonicalizerTool, Node, Node)
with the value returned from this method should behave exactly likeCanonicalizable.canonical(CanonicalizerTool)
.getY()
Gets the current value of the input, so that callingCanonicalizable.Binary.canonical(CanonicalizerTool, Node, Node)
with the value returned from this method should behave exactly likeCanonicalizable.canonical(CanonicalizerTool)
.boolean
This method can be overridden by subclasses ofValueNode
if they need to recompute their stamp if their inputs change.void
void
Methods inherited from class jdk.graal.compiler.nodes.ValueNode
asConstant, asJavaConstant, asNode, checkReplaceAtUsagesInvariants, getStackKind, graph, hasUsagesOtherThan, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, recursivelyDataFlowEqualsUpTo, setStamp, stamp, updateStamp, updateUsagesInterface
Methods inherited from class jdk.graal.compiler.graph.Node
afterClone, applyInputs, applySuccessors, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearNodeSourcePosition, clearSuccessors, copyWithInputs, copyWithInputs, dataFlowEquals, dynamicNodeSizeEstimate, estimatedNodeCycles, estimatedNodeSize, fail, formatTo, getCreationPosition, getDebug, getDebugProperties, getDebugProperties, getId, getIdBeforeDeletion, getInsertionPosition, getNodeClass, getNodeSourcePosition, getOptions, getUsageCount, hasExactlyOneUsage, hasExactlyOneUsageOfType, hashCode, hasMoreThanOneUsage, hasNoUsages, hasUsages, inputPositions, inputs, isAlive, isDeleted, isUnregistered, markDeleted, maybeNotifyZeroUsages, modCount, predecessor, pushInputs, removeDeadUsages, removeUsage, removeUsages, replaceAllInputs, replaceAndDelete, replaceAtAllUsages, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsagesAndDelete, replaceFirstInput, replaceFirstSuccessor, safeDelete, setCreationPosition, setInsertionPosition, setNodeSourcePosition, singleUsage, successorPositions, successors, toString, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, usages, valueEquals, verify, verify, verifyEdges, verifyInputs, verifyNode, withNodeSourcePosition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface jdk.graal.compiler.nodes.spi.Canonicalizable.Binary
canonical, canonical
-
Field Details
-
TYPE
-
x
-
y
-
-
Constructor Details
-
BinaryNode
Creates a new BinaryNode instance.- Parameters:
stamp
- the result type of this instructionx
- the first input instructiony
- the second input instruction
-
-
Method Details
-
getX
Description copied from interface:Canonicalizable.Binary
Gets the current value of the input, so that callingCanonicalizable.Binary.canonical(CanonicalizerTool, Node, Node)
with the value returned from this method should behave exactly likeCanonicalizable.canonical(CanonicalizerTool)
.- Specified by:
getX
in interfaceCanonicalizable.Binary<ValueNode>
-
getY
Description copied from interface:Canonicalizable.Binary
Gets the current value of the input, so that callingCanonicalizable.Binary.canonical(CanonicalizerTool, Node, Node)
with the value returned from this method should behave exactly likeCanonicalizable.canonical(CanonicalizerTool)
.- Specified by:
getY
in interfaceCanonicalizable.Binary<ValueNode>
-
setX
-
setY
-
inferStamp
public boolean inferStamp()Description copied from class:ValueNode
This method can be overridden by subclasses ofValueNode
if they need to recompute their stamp if their inputs change. A typical implementation will compute the stamp and pass it toValueNode.updateStamp(Stamp)
, whose return value can be used as the result of this method.- Overrides:
inferStamp
in classValueNode
- Returns:
- true if the stamp has changed, false otherwise.
-
foldStamp
Compute an improved for this node using the passed in stamps. The stamps must be compatible with the current values ofx
andy
. This code is used to provide the default implementation ofinferStamp()
and may be used by external optimizations.- Parameters:
stampX
-stampY
-
-