public final class LoopBeginNode extends AbstractMergeNode implements IterableNodeType, LIRLowerable
| Modifier and Type | Class and Description |
|---|---|
static class |
LoopBeginNode.LoopType |
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 |
|---|---|
protected boolean |
canNeverOverflow
Flag indicating that this loop can never overflow based on some property not visible in the
loop control computations.
|
protected boolean |
disableCounted
Flag to indicate that this loop must not be detected as a counted loop.
|
protected int |
inversionCount |
static SpeculationReasonGroup |
LOOP_OVERFLOW_DEOPT |
protected double |
loopFrequency |
protected double |
loopOrigFrequency |
protected LoopBeginNode.LoopType |
loopType |
protected int |
nextEndIndex |
protected boolean |
osrLoop |
static CounterKey |
overflowSpeculationNotTaken |
static CounterKey |
overflowSpeculationTaken |
protected int |
peelings |
protected int |
splits |
static NodeClass<LoopBeginNode> |
TYPE |
protected int |
unrollFactor |
protected int |
unswitches |
endsstateAfternextNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Constructor and Description |
|---|
LoopBeginNode() |
addForwardEnd, cfgPredecessors, clearEnds, forwardEndAt, forwardEndCount, forwardEndIndex, forwardEnds, isPhiAtMerge, memoryPhis, phis, removeEnd, valuePhishasSideEffect, setStateAfter, stateAftergetBlockNodes, guards, hasAnchored, hasSpeculationFence, isUsedAsGuardInput, prepareDelete, prepareDelete, prevBegin, setHasSpeculationFenceasNode, next, setNextasConstant, asJavaConstant, asSerializableConstant, getStackKind, graph, hasUsagesOtherThan, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, isSerializableConstant, replaceAtAllUsages, replaceAtUsages, setStamp, stamp, updateStampafterClone, applyInputs, applySuccessors, assertFalse, assertTrue, cfgSuccessors, clearInputs, clearNodeSourcePosition, clearSuccessors, copyWithInputs, copyWithInputs, dataFlowEquals, estimatedNodeCycles, estimatedNodeSize, fail, formatTo, getCreationPosition, getDebug, getDebugProperties, getDebugProperties, getInsertionPosition, getNodeClass, getNodeSourcePosition, getOptions, getUsageCount, hasExactlyOneUsage, hashCode, hasMoreThanOneUsage, hasNoUsages, hasOnlyUsagesOfType, hasUsages, inputPositions, inputs, isAlive, isDeleted, isUnregistered, markDeleted, maybeNotifyZeroUsages, modCount, predecessor, pushInputs, removeUsage, replaceAllInputs, replaceAndDelete, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsagesAndDelete, replaceAtUsagesAndDelete, replaceFirstInput, replaceFirstInput, replaceFirstSuccessor, safeDelete, setCreationPosition, setInsertionPosition, setNodeSourcePosition, successorPositions, successors, toString, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitstatesasNodepublic static final NodeClass<LoopBeginNode> TYPE
protected double loopFrequency
protected double loopOrigFrequency
protected int nextEndIndex
protected int unswitches
protected int splits
protected int peelings
protected int inversionCount
protected LoopBeginNode.LoopType loopType
protected int unrollFactor
protected boolean osrLoop
protected boolean disableCounted
protected boolean canNeverOverflow
public static final CounterKey overflowSpeculationTaken
public static final CounterKey overflowSpeculationNotTaken
public static final SpeculationReasonGroup LOOP_OVERFLOW_DEOPT
public void checkDisableCountedBySpeculation(int bci,
StructuredGraph graph)
public boolean canNeverOverflow()
public void setCanNeverOverflow()
public boolean countedLoopDisabled()
public boolean isSimpleLoop()
public void setPreLoop()
public boolean isPreLoop()
public void setMainLoop()
public boolean isMainLoop()
public void setPostLoop()
public boolean isPostLoop()
public int getUnrollFactor()
public void setUnrollFactor(int currentUnrollFactor)
public void disableSafepoint()
loop ends.public double loopOrigFrequency()
public void setLoopOrigFrequency(double loopOrigFrequency)
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 LoopBeginNode.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 LoopBeginNode.phiPredecessorIndex(org.graalvm.compiler.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 boolean isSingleEntryLoop()
public AbstractEndNode forwardEnd()
public int splits()
public void incrementSplits()
public int peelings()
public void incrementPeelings()
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 AbstractMergeNodepublic 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 LoopEndNode getSingleLoopEnd()
public void removeExits()
public GuardingNode getOverflowGuard()
public void setOverflowGuard(GuardingNode overflowGuard)
public void canonicalizePhis(SimplifierTool tool)
public void markOsrLoop()
public boolean isOsrLoop()
protected boolean verifyState()
verifyState in class AbstractMergeNode