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 |
ends
stateAfter
next
NODE_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, valuePhis
hasSideEffect, setStateAfter, stateAfter
getBlockNodes, guards, hasAnchored, hasSpeculationFence, isUsedAsGuardInput, prepareDelete, prepareDelete, prevBegin, setHasSpeculationFence
asNode, next, setNext
asConstant, asJavaConstant, asSerializableConstant, getStackKind, graph, hasUsagesOtherThan, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, isSerializableConstant, replaceAtAllUsages, replaceAtUsages, setStamp, stamp, updateStamp
afterClone, 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, withNodeSourcePosition
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
states
asNode
public 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 AbstractMergeNode
public 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 LIRLowerable
generate
in class AbstractMergeNode
protected void deleteEnd(AbstractEndNode end)
deleteEnd
in class AbstractMergeNode
public int phiPredecessorCount()
phiPredecessorCount
in class AbstractMergeNode
public int phiPredecessorIndex(AbstractEndNode pred)
phiPredecessorIndex
in class AbstractMergeNode
public AbstractEndNode phiPredecessorAt(int index)
phiPredecessorAt
in class AbstractMergeNode
public boolean verify()
verify
in class AbstractMergeNode
public int getLoopEndCount()
public int unswitches()
public void incrementUnswitches()
public int getInversionCount()
public void setInversionCount(int count)
public void simplify(SimplifierTool tool)
AbstractMergeNode
simplify
in interface Simplifiable
simplify
in class AbstractMergeNode
public 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