public final class LoopBeginNode extends AbstractMergeNode implements IterableNodeType, LIRLowerable
Node.ConstantNodeParameter, Node.InjectedNodeParameter, Node.Input, Node.NodeIntrinsic, Node.OptionalInput, Node.Successor, Node.ValueNumberable| Modifier and Type | Field and Description |
|---|---|
protected int |
inversionCount |
protected double |
loopFrequency |
protected int |
nextEndIndex |
private static int |
NO_INCREMENT |
(package private) GuardingNode |
overflowGuard |
static NodeClass<LoopBeginNode> |
TYPE |
protected int |
unswitches |
endsstateAfternextNODE_LIST, NOT_ITERABLE, USE_UNSAFE_TO_CLONE, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Constructor and Description |
|---|
LoopBeginNode() |
| Modifier and Type | Method and Description |
|---|---|
NodeIterable<Node> |
anchored() |
void |
canonicalizePhis(SimplifierTool tool)
Coalesces loop phis that represent the same value (which is not handled by normal Global
Value Numbering).
|
protected void |
deleteEnd(AbstractEndNode end) |
AbstractEndNode |
forwardEnd() |
void |
generate(NodeLIRBuilderTool gen) |
int |
getInversionCount() |
int |
getLoopEndCount() |
GuardingNode |
getOverflowGuard() |
private static int[] |
getSelfIncrements(PhiNode phi)
Returns an array with one entry for each input of the phi, which is either
NO_INCREMENT or the increment, i.e., the value by which the phi is incremented in
the corresponding branch. |
void |
incrementUnswitches() |
boolean |
isLoopExit(AbstractBeginNode begin) |
NodeIterable<LoopEndNode> |
loopEnds()
Returns the unordered set of
LoopEndNode that correspond to back-edges for
this loop. |
NodeIterable<LoopExitNode> |
loopExits() |
double |
loopFrequency() |
(package private) int |
nextEndIndex() |
LoopEndNode[] |
orderedLoopEnds()
Returns the set of
LoopEndNode that correspond to back-edges for this loop, in
increasing phiPredecessorIndex(com.oracle.graal.nodes.AbstractEndNode) order. |
AbstractEndNode |
phiPredecessorAt(int index) |
int |
phiPredecessorCount() |
int |
phiPredecessorIndex(AbstractEndNode pred) |
void |
removeDeadPhis()
Removes dead phi nodes hanging from this node.
|
void |
removeExits() |
void |
setInversionCount(int count) |
void |
setLoopFrequency(double loopFrequency) |
void |
setOverflowGuard(GuardingNode overflowGuard) |
void |
simplify(SimplifierTool tool)
This simplify method can deal with a null value for tool, so that it can be used outside of
canonicalization.
|
int |
unswitches() |
boolean |
verify() |
addForwardEnd, cfgPredecessors, clearEnds, forwardEndAt, forwardEndCount, forwardEndIndex, forwardEnds, isPhiAtMerge, phis, removeEnd, valuePhishasSideEffect, setStateAfter, stateAftergetBlockNodes, guards, prepareDelete, prepareDelete, prevBegin, proxies, removeProxiesasNode, next, setNextasConstant, asJavaConstant, getKind, graph, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isNullConstant, setStamp, stamp, updateStampacceptInputs, acceptSuccessors, afterClone, assertFalse, assertTrue, 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, toString, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verifyEdges, verifyInputsclone, finalize, getClass, notify, notifyAll, wait, wait, waitasNodestatesasNodeasNodepublic static final NodeClass<LoopBeginNode> TYPE
protected double loopFrequency
protected int nextEndIndex
protected int unswitches
protected int inversionCount
GuardingNode overflowGuard
private static final int NO_INCREMENT
public LoopBeginNode()
public double loopFrequency()
public void setLoopFrequency(double loopFrequency)
public NodeIterable<LoopEndNode> loopEnds()
LoopEndNode that correspond to back-edges for
this loop. The order of the back-edges is unspecified, if you need to get an ordering
compatible for PhiNode creation, use orderedLoopEnds().LoopEndNode that correspond to back-edges for this looppublic NodeIterable<LoopExitNode> loopExits()
public NodeIterable<Node> anchored()
anchored in class AbstractMergeNodepublic LoopEndNode[] orderedLoopEnds()
LoopEndNode that correspond to back-edges for this loop, in
increasing phiPredecessorIndex(com.oracle.graal.nodes.AbstractEndNode) order. This method is suited to create new loop
PhiNode.
PhiNode phi = new ValuePhiNode(stamp, loop);
phi.addInput(forwardEdgeValue);
for (LoopEndNode loopEnd : loop.orderedLoopEnds()) {
phi.addInput(backEdgeValue(loopEnd));
}
LoopEndNode that correspond to back-edges for this looppublic AbstractEndNode forwardEnd()
public void generate(NodeLIRBuilderTool gen)
generate in interface LIRLowerablegenerate in class AbstractMergeNodeprotected void deleteEnd(AbstractEndNode end)
deleteEnd in class AbstractMergeNodepublic int phiPredecessorCount()
phiPredecessorCount in class AbstractMergeNodepublic int phiPredecessorIndex(AbstractEndNode pred)
phiPredecessorIndex in class AbstractMergeNodepublic AbstractEndNode phiPredecessorAt(int index)
phiPredecessorAt in class AbstractMergeNodepublic boolean verify()
verify in class AbstractBeginNodeint nextEndIndex()
public int getLoopEndCount()
public int unswitches()
public void incrementUnswitches()
public int getInversionCount()
public void setInversionCount(int count)
public void simplify(SimplifierTool tool)
AbstractMergeNodesimplify in interface Simplifiablesimplify in class AbstractMergeNodepublic boolean isLoopExit(AbstractBeginNode begin)
public void removeExits()
public GuardingNode getOverflowGuard()
public void setOverflowGuard(GuardingNode overflowGuard)
public void removeDeadPhis()
private static int[] getSelfIncrements(PhiNode phi)
NO_INCREMENT or the increment, i.e., the value by which the phi is incremented in
the corresponding branch.public void canonicalizePhis(SimplifierTool tool)