public abstract class ValueNode extends Node implements ValueNodeInterface
Node.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberable| Modifier and Type | Field and Description |
|---|---|
static ValueNode[] |
EMPTY_ARRAY |
protected Stamp |
stamp
The kind of this value.
|
static NodeClass<ValueNode> |
TYPE |
NODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Constructor and Description |
|---|
ValueNode(NodeClass<? extends ValueNode> c,
Stamp stamp) |
| Modifier and Type | Method and Description |
|---|---|
Constant |
asConstant()
Convert this value to a constant if it is a constant, otherwise return null.
|
JavaConstant |
asJavaConstant() |
ValueNode |
asNode() |
SerializableConstant |
asSerializableConstant() |
protected boolean |
checkReplaceAtUsagesInvariants(Node other)
Subclasses can override this to check invariants related to replacing uses of
this. |
JavaKind |
getStackKind() |
StructuredGraph |
graph()
Gets the graph context of
this. |
boolean |
hasUsagesOtherThan(ValueNode node,
NodeValueMap nodeValueMap)
Checks if this node has usages other than the given node
node. |
boolean |
inferStamp()
This method can be overridden by subclasses of
ValueNode if they need to recompute
their stamp if their inputs change. |
boolean |
isAllowedUsageType(InputType type) |
boolean |
isConstant()
Checks whether this value is a constant (i.e.
|
static NodePredicate |
isConstantPredicate() |
boolean |
isDefaultConstant() |
boolean |
isIllegalConstant() |
boolean |
isJavaConstant() |
boolean |
isNullConstant()
Checks whether this value represents the null constant.
|
boolean |
isSerializableConstant() |
boolean |
recursivelyDataFlowEqualsUpTo(FloatingNode that,
InputType ignoredInputType)
Determines whether this node is recursively equal to the other node while ignoring
differences in control-flow edges and
inputs of the given
ignoredInputType. |
void |
setStamp(Stamp stamp) |
Stamp |
stamp(NodeView view) |
protected boolean |
updateStamp(Stamp newStamp)
Checks if the given stamp is different than the current one (
newStamp.equals(oldStamp) == false). |
protected void |
updateUsagesInterface(ValueNodeInterface oldInput,
ValueNodeInterface newInput) |
afterClone, 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, withNodeSourcePositionpublic static final ValueNode[] EMPTY_ARRAY
protected Stamp stamp
JavaKind.Void for instructions that produce no value.
This kind is guaranteed to be a stack kind.public final void setStamp(Stamp stamp)
public final StructuredGraph graph()
Nodethis.protected final boolean updateStamp(Stamp newStamp)
newStamp.equals(oldStamp) == false). If it is different then the new stamp will
become the current stamp for this node.public boolean inferStamp()
ValueNode 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.public final JavaKind getStackKind()
public final boolean isConstant()
ConstantNode.true if this value is a constantpublic static NodePredicate isConstantPredicate()
public final boolean isNullConstant()
true if this value represents the null constantpublic final boolean isDefaultConstant()
public final Constant asConstant()
JavaConstant represented by this value if it is a constant; null
otherwisepublic boolean isIllegalConstant()
public final boolean isJavaConstant()
public final JavaConstant asJavaConstant()
public final boolean isSerializableConstant()
public final SerializableConstant asSerializableConstant()
public final ValueNode asNode()
asNode in interface ValueNodeInterfaceprotected void updateUsagesInterface(ValueNodeInterface oldInput, ValueNodeInterface newInput)
public boolean isAllowedUsageType(InputType type)
isAllowedUsageType in class Nodepublic boolean hasUsagesOtherThan(ValueNode node, NodeValueMap nodeValueMap)
node.node - node which is ignored when searching for usagesnodeValueMap - protected boolean checkReplaceAtUsagesInvariants(Node other)
Nodethis.checkReplaceAtUsagesInvariants in class Nodetrue if all invariants holdpublic boolean recursivelyDataFlowEqualsUpTo(FloatingNode that, InputType ignoredInputType)
ignoredInputType. Recursive equality is only applied to
FloatingNodes reachable via inputs; FixedNodes are only considered equal if
they are the same node.
WARNING: This method is useful only in very particular contexts, and only for limited
purposes. For example, it might be used to check if two values are equal up to memory or
guard inputs. Some external knowledge about the memory graph, data flow, control flow, etc.,
is required to interpret the meaning of this "equality". It is not legal in general to
replace one of the "equal" nodes with the other.