public class ArrayEqualsNode extends FixedWithNextNode implements LIRLowerable, Canonicalizable, Virtualizable, MemoryAccess
Node.ConstantNodeParameter, Node.EdgeVisitor, Node.IndirectCanonicalization, Node.InjectedNodeParameter, Node.Input, Node.NodeInsertionStackTrace, Node.NodeIntrinsic, Node.NodeIntrinsicFactory, Node.OptionalInput, Node.Successor, Node.ValueNumberableCanonicalizable.Binary<T extends Node>, Canonicalizable.BinaryCommutative<T extends Node>, Canonicalizable.Ternary<T extends Node>, Canonicalizable.Unary<T extends Node>| Modifier and Type | Field and Description |
|---|---|
protected ValueNode |
array1
One array to be tested for equality.
|
protected ValueNode |
array2
The other array to be tested for equality.
|
protected JavaKind |
kind
JavaKind of the arrays to compare. |
protected ValueNode |
length
Length of both arrays.
|
static NodeClass<ArrayEqualsNode> |
TYPE |
nextEMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
protected |
ArrayEqualsNode(NodeClass<? extends ArrayEqualsNode> c,
ValueNode array1,
ValueNode array2,
ValueNode length,
JavaKind kind) |
|
ArrayEqualsNode(ValueNode array1,
ValueNode array2,
ValueNode length,
JavaKind kind) |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
arrayEquals(ConstantReflectionProvider constantReflection,
JavaConstant a,
int startIndexA,
JavaConstant b,
int startIndexB,
int len) |
Node |
canonical(CanonicalizerTool tool)
Implementations of this method can provide local optimizations like constant folding and
strength reduction.
|
static boolean |
equals(Object array1,
Object array2,
int length,
JavaKind kind) |
void |
generate(NodeLIRBuilderTool gen) |
protected void |
generateArrayEquals(NodeLIRBuilderTool gen) |
ValueNode |
getArray1() |
ValueNode |
getArray2() |
JavaKind |
getKind() |
MemoryKill |
getLastLocationAccess() |
ValueNode |
getLength() |
org.graalvm.word.LocationIdentity |
getLocationIdentity() |
void |
setLastLocationAccess(MemoryKill lla) |
void |
virtualize(VirtualizerTool tool)
A node class can implement this method to convey information about what its effect would be
if some of its inputs were virtualized.
|
asFixedWithNextNode, next, setNextasFixedNode, verifyasConstant, 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, dynamicNodeSizeEstimate, 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, replaceAtUsages, replaceAtUsagesAndDelete, replaceAtUsagesAndDelete, replaceFirstInput, replaceFirstSuccessor, safeDelete, setCreationPosition, setInsertionPosition, setNodeSourcePosition, singleUsage, successorPositions, successors, toString, toString, updateNodeSourcePosition, updatePredecessor, updateUsages, usages, valueEquals, verifyEdges, verifyInputs, verifySourcePosition, withNodeSourcePositionclone, equals, getClass, notify, notifyAll, wait, wait, waitasNodeasFixedNodepublic static final NodeClass<ArrayEqualsNode> TYPE
protected final JavaKind kind
JavaKind of the arrays to compare.
The arrays are guaranteed to always have the same kind because the signature of
Arrays.equals(long[], long[]) only allows arrays of the same kind.protected ValueNode array1
protected ValueNode array2
protected ValueNode length
public ArrayEqualsNode(ValueNode array1, ValueNode array2, ValueNode length, JavaKind kind)
protected ArrayEqualsNode(NodeClass<? extends ArrayEqualsNode> c, ValueNode array1, ValueNode array2, ValueNode length, JavaKind kind)
protected static boolean arrayEquals(ConstantReflectionProvider constantReflection,
JavaConstant a,
int startIndexA,
JavaConstant b,
int startIndexB,
int len)
public Node canonical(CanonicalizerTool tool)
Canonicalizablenull will delete the current node and replace it with null at
all usages. Note that it is not necessary to delete floating nodes that have no more usages
this way - they will be deleted automatically.canonical in interface Canonicalizabletool - provides access to runtime interfaces like MetaAccessProviderpublic void virtualize(VirtualizerTool tool)
Virtualizablevirtualize in interface Virtualizabletool - the tool used to describe the effects of this nodepublic ValueNode getArray1()
public ValueNode getArray2()
public ValueNode getLength()
public JavaKind getKind()
public void generate(NodeLIRBuilderTool gen)
generate in interface LIRLowerableprotected void generateArrayEquals(NodeLIRBuilderTool gen)
public org.graalvm.word.LocationIdentity getLocationIdentity()
getLocationIdentity in interface MemoryAccesspublic MemoryKill getLastLocationAccess()
getLastLocationAccess in interface MemoryAccesspublic void setLastLocationAccess(MemoryKill lla)
setLastLocationAccess in interface MemoryAccesslla - the MemoryKill that represents the last kill of the
LocationIdentity returned by MemoryAccess.getLocationIdentity()