public abstract class PhiNode extends FloatingNode implements Simplifiable
PhiNodes represent the merging of edges at a control flow merges (
AbstractMergeNode or LoopBeginNode). For a AbstractMergeNode, the order
of the values corresponds to the order of the ends. For LoopBeginNodes, the first value
corresponds to the loop's predecessor, while the rest of the values correspond to the
LoopEndNodes.| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
PhiNode.MultipleValuesNode |
Node.ConstantNodeParameter, Node.InjectedNodeParameter, Node.Input, Node.NodeIntrinsic, Node.OptionalInput, Node.Successor, Node.ValueNumberable| Modifier and Type | Field and Description |
|---|---|
protected AbstractMergeNode |
merge |
static ValueNode |
MULTIPLE_VALUES |
static NodeClass<PhiNode> |
TYPE |
NODE_LIST, NOT_ITERABLE, USE_UNSAFE_TO_CLONE, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
protected |
PhiNode(NodeClass<? extends PhiNode> c,
Stamp stamp,
AbstractMergeNode merge) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInput(ValueNode x) |
void |
clearValues() |
ValueNode |
firstValue() |
void |
initializeValueAt(int i,
ValueNode x)
Sets the value at the given index and makes sure that the values list is large enough.
|
boolean |
isLoopPhi() |
AbstractMergeNode |
merge() |
void |
removeInput(int index) |
void |
setMerge(AbstractMergeNode x) |
void |
setValueAt(AbstractEndNode end,
ValueNode x) |
void |
setValueAt(int i,
ValueNode x) |
void |
simplify(SimplifierTool tool)
Must be overridden by subclasses that implement
Simplifiable. |
ValueNode |
singleBackValue()
If all inputs (but the first one) are the same value, this value is returned, otherwise
MULTIPLE_VALUES. |
ValueNode |
singleValue()
If all inputs are the same value, this value is returned, otherwise
MULTIPLE_VALUES. |
String |
toString(Verbosity verbosity)
Creates a String representation for this node with a given
Verbosity. |
ValueNode |
valueAt(AbstractEndNode pred) |
ValueNode |
valueAt(int i)
Get the instruction that produces the value associated with the i'th predecessor of the
merge.
|
int |
valueCount()
Get the number of inputs to this phi (i.e.
|
abstract NodeInputList<ValueNode> |
values() |
boolean |
verify() |
asNodeasConstant, asJavaConstant, getKind, graph, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isNullConstant, setStamp, stamp, updateStampacceptInputs, acceptSuccessors, afterClone, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearSuccessors, copyWithInputs, copyWithInputs, equals, fail, formatTo, getDebugProperties, getDebugProperties, getId, getNodeClass, getUsageAt, getUsageCount, hashCode, hasNoUsages, hasUsages, inputs, isAlive, isDeleted, markDeleted, modCount, newIdentityMap, newIdentityMap, newIdentityMap, newMap, newMap, newMap, newSet, newSet, predecessor, pushInputs, removeUsage, replaceAndDelete, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceFirstInput, replaceFirstSuccessor, safeDelete, successors, toString, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verifyEdges, verifyInputsprotected AbstractMergeNode merge
public static final ValueNode MULTIPLE_VALUES
protected PhiNode(NodeClass<? extends PhiNode> c, Stamp stamp, AbstractMergeNode merge)
public abstract NodeInputList<ValueNode> values()
public AbstractMergeNode merge()
public void setMerge(AbstractMergeNode x)
public ValueNode valueAt(int i)
i - the index of the predecessorpublic void initializeValueAt(int i, ValueNode x)
i - the index at which to set the valuex - the new phi input value for the given locationpublic void setValueAt(int i, ValueNode x)
public void setValueAt(AbstractEndNode end, ValueNode x)
public ValueNode valueAt(AbstractEndNode pred)
public int valueCount()
public void clearValues()
public String toString(Verbosity verbosity)
NodeVerbosity.public void removeInput(int index)
public ValueNode singleValue()
MULTIPLE_VALUES.
Note that null is a valid return value, since GuardPhiNodes can have
null inputs.public ValueNode singleBackValue()
MULTIPLE_VALUES. Note that null is a valid return value, since
GuardPhiNodes can have null inputs.public void simplify(SimplifierTool tool)
NodeSimplifiable. The implementation in
Node exists to obviate the need to cast a node before invoking
Simplifiable.simplify(SimplifierTool).simplify in interface Simplifiablesimplify in class Nodepublic ValueNode firstValue()
public boolean isLoopPhi()