public abstract class TernaryNode extends FloatingNode implements Canonicalizable.Ternary<ValueNode>
TernaryNode class is the base of arithmetic and logic operations with three inputs.Node.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberableCanonicalizable.Binary<T extends Node>, Canonicalizable.BinaryCommutative<T extends Node>, Canonicalizable.Ternary<T extends Node>, Canonicalizable.Unary<T extends Node>| Modifier and Type | Field and Description |
|---|---|
static NodeClass<TernaryNode> |
TYPE |
protected ValueNode |
x |
protected ValueNode |
y |
protected ValueNode |
z |
EMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
protected |
TernaryNode(NodeClass<? extends TernaryNode> c,
Stamp stamp,
ValueNode x,
ValueNode y,
ValueNode z)
Creates a new TernaryNode instance.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Stamp |
foldStamp(Stamp stampX,
Stamp stampY,
Stamp stampZ)
Compute an improved stamp for this node using the passed in stamps.
|
ValueNode |
getX()
Gets the current value of the input, so that calling
Canonicalizable.Ternary.canonical(CanonicalizerTool, Node, Node, Node) with the value returned from this
method should behave exactly like Canonicalizable.canonical(CanonicalizerTool). |
ValueNode |
getY()
Gets the current value of the input, so that calling
Canonicalizable.Ternary.canonical(CanonicalizerTool, Node, Node, Node) with the value returned from this
method should behave exactly like Canonicalizable.canonical(CanonicalizerTool). |
ValueNode |
getZ()
Gets the current value of the input, so that calling
Canonicalizable.Ternary.canonical(CanonicalizerTool, Node, Node, Node) with the value returned from this
method should behave exactly like Canonicalizable.canonical(CanonicalizerTool). |
boolean |
inferStamp()
This method can be overridden by subclasses of
ValueNode if they need to recompute
their stamp if their inputs change. |
void |
setX(ValueNode x) |
void |
setY(ValueNode y) |
void |
setZ(ValueNode z) |
asConstant, asJavaConstant, asNode, asSerializableConstant, checkReplaceAtUsagesInvariants, getStackKind, graph, hasUsagesOtherThan, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, isSerializableConstant, recursivelyDataFlowEqualsUpTo, setStamp, stamp, updateStamp, updateUsagesInterfaceafterClone, applyInputs, applySuccessors, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearNodeSourcePosition, clearSuccessors, copyWithInputs, copyWithInputs, dataFlowEquals, dynamicNodeSizeEstimate, estimatedNodeCycles, estimatedNodeSize, fail, formatTo, getCreationPosition, getDebug, getDebugProperties, getDebugProperties, getInsertionPosition, getNodeClass, getNodeSourcePosition, getOptions, getUsageCount, hasExactlyOneUsage, hashCode, hasMoreThanOneUsage, hasNoUsages, hasOnlyUsagesOfType, hasUsages, hasUsagesOfType, inputPositions, inputs, isAlive, isDeleted, isUnregistered, markDeleted, maybeNotifyZeroUsages, modCount, predecessor, pushInputs, removeUsage, replaceAllInputs, replaceAndDelete, replaceAtAllUsages, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsagesAndDelete, replaceAtUsagesAndDelete, replaceFirstInput, replaceFirstSuccessor, safeDelete, setCreationPosition, setInsertionPosition, setNodeSourcePosition, singleUsage, successorPositions, successors, toString, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, usages, valueEquals, verify, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionclone, equals, getClass, notify, notifyAll, wait, wait, waitcanonical, canonicalpublic static final NodeClass<TernaryNode> TYPE
protected ValueNode x
protected ValueNode y
protected ValueNode z
protected TernaryNode(NodeClass<? extends TernaryNode> c, Stamp stamp, ValueNode x, ValueNode y, ValueNode z)
stamp - the result type of this instructionx - the first input instructiony - the second input instructionz - the second input instructionpublic ValueNode getX()
Canonicalizable.TernaryCanonicalizable.Ternary.canonical(CanonicalizerTool, Node, Node, Node) with the value returned from this
method should behave exactly like Canonicalizable.canonical(CanonicalizerTool).getX in interface Canonicalizable.Ternary<ValueNode>public ValueNode getY()
Canonicalizable.TernaryCanonicalizable.Ternary.canonical(CanonicalizerTool, Node, Node, Node) with the value returned from this
method should behave exactly like Canonicalizable.canonical(CanonicalizerTool).getY in interface Canonicalizable.Ternary<ValueNode>public ValueNode getZ()
Canonicalizable.TernaryCanonicalizable.Ternary.canonical(CanonicalizerTool, Node, Node, Node) with the value returned from this
method should behave exactly like Canonicalizable.canonical(CanonicalizerTool).getZ in interface Canonicalizable.Ternary<ValueNode>public void setX(ValueNode x)
public void setY(ValueNode y)
public void setZ(ValueNode z)
public boolean inferStamp()
ValueNodeValueNode if they need to recompute
their stamp if their inputs change. A typical implementation will compute the stamp and pass
it to ValueNode.updateStamp(Stamp), whose return value can be used as the result of this
method.inferStamp in class ValueNodepublic abstract Stamp foldStamp(Stamp stampX, Stamp stampY, Stamp stampZ)
TernaryNode.x, TernaryNode.y and TernaryNode.z. This code is
used to provide the default implementation of TernaryNode.inferStamp() and may be used by
external optimizations.stampX - stampY - stampZ -