public final class StackValueNode
extends org.graalvm.compiler.nodes.AbstractStateSplit
implements org.graalvm.compiler.nodes.spi.LIRLowerable, org.graalvm.compiler.graph.IterableNodeType
StackValueNode. While the node itself is cloned, the StackValueNode.slotIdentity is not cloned
(it is a shallow object copy).
We don't track the lifetime of StackValueNodes. So, stack slots are not reused very
efficiently at the moment. However, we at least ensure that stack slots are reused if a method is
inlined multiple times into the same compilation unit. In this context, we must be careful though
as recursively inlined methods must not share their stack slots. So, we compute the inlined
recursion depth in the StackValueRecursionDepthPhase.
The actual assignment of the StackValueNode.stackSlotHolder is done by the
StackValueSlotAssignmentPhase in a way that all nodes with the same identity and
recursion depth share a stack slot.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
StackValueNode.StackSlotHolder |
static class |
StackValueNode.StackSlotIdentity |
org.graalvm.compiler.graph.Node.ConstantNodeParameter, org.graalvm.compiler.graph.Node.EdgeVisitor, org.graalvm.compiler.graph.Node.IndirectCanonicalization, org.graalvm.compiler.graph.Node.InjectedNodeParameter, org.graalvm.compiler.graph.Node.Input, org.graalvm.compiler.graph.Node.NodeInsertionStackTrace, org.graalvm.compiler.graph.Node.NodeIntrinsic, org.graalvm.compiler.graph.Node.NodeIntrinsicFactory, org.graalvm.compiler.graph.Node.OptionalInput, org.graalvm.compiler.graph.Node.Successor, org.graalvm.compiler.graph.Node.ValueNumberable| Modifier and Type | Field and Description |
|---|---|
protected int |
alignmentInBytes |
protected int |
sizeInBytes |
protected StackValueNode.StackSlotIdentity |
slotIdentity |
protected StackValueNode.StackSlotHolder |
stackSlotHolder |
static org.graalvm.compiler.graph.NodeClass<StackValueNode> |
TYPE |
| Modifier | Constructor and Description |
|---|---|
protected |
StackValueNode(int sizeInBytes,
int alignmentInBytes,
StackValueNode.StackSlotIdentity slotIdentity) |
| Modifier and Type | Method and Description |
|---|---|
static org.graalvm.compiler.nodes.ValueNode |
create(long numElements,
long elementSize,
org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext b)
Factory method used for intrinsifying
StackValue API methods. |
void |
generate(org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool gen) |
static org.graalvm.word.WordBase |
stackValue(int sizeInBytes,
int alignmentInBytes,
StackValueNode.StackSlotIdentity slotIdentifier) |
hasSideEffect, setStateAfter, stateAfter, verifyasFixedWithNextNode, next, setNextasConstant, asJavaConstant, asNode, asSerializableConstant, checkReplaceAtUsagesInvariants, getStackKind, graph, hasUsagesOtherThan, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isDefaultConstant, isIllegalConstant, isJavaConstant, isNullConstant, isSerializableConstant, recursivelyDataFlowEqualsUpTo, setStamp, stamp, updateStamp, updateUsagesInterfaceafterClone, applyInputs, applySuccessors, assertFalse, assertTrue, cfgPredecessors, 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, hasUsagesOfType, inputPositions, inputs, isAlive, isDeleted, isUnregistered, markDeleted, maybeNotifyZeroUsages, modCount, predecessor, pushInputs, removeUsage, replaceAllInputs, replaceAndDelete, replaceAtAllUsages, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceAtUsagesAndDelete, replaceAtUsagesAndDelete, replaceFirstInput, replaceFirstSuccessor, safeDelete, setCreationPosition, setInsertionPosition, setNodeSourcePosition, singleUsage, successorPositions, successors, toString, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, usages, valueEquals, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionpublic static final org.graalvm.compiler.graph.NodeClass<StackValueNode> TYPE
protected final int sizeInBytes
protected final int alignmentInBytes
protected final StackValueNode.StackSlotIdentity slotIdentity
protected StackValueNode.StackSlotHolder stackSlotHolder
protected StackValueNode(int sizeInBytes,
int alignmentInBytes,
StackValueNode.StackSlotIdentity slotIdentity)
public static org.graalvm.compiler.nodes.ValueNode create(long numElements,
long elementSize,
org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext b)
StackValue API methods. This method therefore
must follow the API specification.public void generate(org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool gen)
generate in interface org.graalvm.compiler.nodes.spi.LIRLowerablepublic static org.graalvm.word.WordBase stackValue(int sizeInBytes,
int alignmentInBytes,
StackValueNode.StackSlotIdentity slotIdentifier)