public class ArrayRegionEqualsNode extends FixedWithNextNode implements Canonicalizable, LIRLowerable, MemoryAccess, ConstantReflectionUtil.ArrayBaseOffsetProvider
chars with an array region interpreted as bytes, in which case the
byte values are zero-extended for the comparison. In this case, the first kind must be
char, and the underlying array must be a byte array (this condition is not
checked). Other combinations of kinds are currently not allowed.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 |
arrayA
Pointer to the first array object.
|
protected ValueNode |
arrayB
Pointer to the second array object.
|
protected ValueNode |
dynamicStrides
Optional argument for dispatching to any combination of strides at runtime, as described in
StrideUtil. |
protected MemoryKill |
lastLocationAccess |
protected ValueNode |
length
Length of the array region.
|
protected org.graalvm.word.LocationIdentity |
locationIdentity |
protected ValueNode |
offsetA
Byte offset to be added to the first array pointer.
|
protected ValueNode |
offsetB
Byte offset to be added to the second array pointer.
|
protected JavaKind |
strideA
JavaKind of the arrays to compare. |
protected JavaKind |
strideB |
static NodeClass<ArrayRegionEqualsNode> |
TYPE |
nextEMPTY_ARRAY, stampNODE_LIST, NOT_ITERABLE, TRACK_CREATION_POSITION, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges| Modifier | Constructor and Description |
|---|---|
protected |
ArrayRegionEqualsNode(NodeClass<? extends ArrayRegionEqualsNode> c,
ValueNode arrayA,
ValueNode offsetA,
ValueNode arrayB,
ValueNode offsetB,
ValueNode length,
ValueNode dynamicStrides,
JavaKind strideA,
JavaKind strideB,
org.graalvm.word.LocationIdentity locationIdentity) |
|
ArrayRegionEqualsNode(ValueNode arrayA,
ValueNode offsetA,
ValueNode arrayB,
ValueNode offsetB,
ValueNode length,
JavaKind strideA,
JavaKind strideB) |
|
ArrayRegionEqualsNode(ValueNode arrayA,
ValueNode offsetA,
ValueNode arrayB,
ValueNode offsetB,
ValueNode length,
JavaKind strideA,
JavaKind strideB,
org.graalvm.word.LocationIdentity locationIdentity) |
|
ArrayRegionEqualsNode(ValueNode arrayA,
ValueNode offsetA,
ValueNode arrayB,
ValueNode offsetB,
ValueNode length,
ValueNode dynamicStrides) |
|
ArrayRegionEqualsNode(ValueNode arrayA,
ValueNode offsetA,
ValueNode arrayB,
ValueNode offsetB,
ValueNode length,
ValueNode dynamicStrides,
org.graalvm.word.LocationIdentity locationIdentity) |
| Modifier and Type | Method and Description |
|---|---|
ValueNode |
canonical(CanonicalizerTool tool)
Implementations of this method can provide local optimizations like constant folding and
strength reduction.
|
void |
generate(NodeLIRBuilderTool gen) |
protected void |
generateArrayRegionEquals(NodeLIRBuilderTool gen) |
ValueNode |
getArrayA() |
ValueNode |
getArrayB() |
int |
getArrayBaseOffset(MetaAccessProvider metaAccess,
ValueNode array,
JavaKind elementKind) |
int |
getDirectStubCallIndex() |
ValueNode |
getDynamicStrides() |
MemoryKill |
getLastLocationAccess() |
ValueNode |
getLength() |
org.graalvm.word.LocationIdentity |
getLocationIdentity() |
ValueNode |
getOffsetA() |
ValueNode |
getOffsetB() |
JavaKind |
getStrideA() |
JavaKind |
getStrideB() |
static boolean |
regionEquals(Object arrayA,
long offsetA,
Object arrayB,
long offsetB,
int length,
JavaKind kind) |
static boolean |
regionEquals(Object arrayA,
long offsetA,
Object arrayB,
long offsetB,
int length,
JavaKind kind1,
JavaKind kind2) |
void |
setLastLocationAccess(MemoryKill lla) |
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<ArrayRegionEqualsNode> TYPE
protected final JavaKind strideA
JavaKind of the arrays to compare.protected final JavaKind strideB
protected final org.graalvm.word.LocationIdentity locationIdentity
protected ValueNode arrayA
protected ValueNode offsetA
protected ValueNode arrayB
protected ValueNode offsetB
protected ValueNode length
protected ValueNode dynamicStrides
StrideUtil.protected MemoryKill lastLocationAccess
public ArrayRegionEqualsNode(ValueNode arrayA, ValueNode offsetA, ValueNode arrayB, ValueNode offsetB, ValueNode length, ValueNode dynamicStrides, org.graalvm.word.LocationIdentity locationIdentity)
public ArrayRegionEqualsNode(ValueNode arrayA, ValueNode offsetA, ValueNode arrayB, ValueNode offsetB, ValueNode length, JavaKind strideA, JavaKind strideB)
public ArrayRegionEqualsNode(ValueNode arrayA, ValueNode offsetA, ValueNode arrayB, ValueNode offsetB, ValueNode length, JavaKind strideA, JavaKind strideB, org.graalvm.word.LocationIdentity locationIdentity)
public ArrayRegionEqualsNode(ValueNode arrayA, ValueNode offsetA, ValueNode arrayB, ValueNode offsetB, ValueNode length, ValueNode dynamicStrides)
protected ArrayRegionEqualsNode(NodeClass<? extends ArrayRegionEqualsNode> c, ValueNode arrayA, ValueNode offsetA, ValueNode arrayB, ValueNode offsetB, ValueNode length, ValueNode dynamicStrides, JavaKind strideA, JavaKind strideB, org.graalvm.word.LocationIdentity locationIdentity)
public static boolean regionEquals(Object arrayA, long offsetA, Object arrayB, long offsetB, int length, JavaKind kind)
public static boolean regionEquals(Object arrayA, long offsetA, Object arrayB, long offsetB, int length, JavaKind kind1, JavaKind kind2)
public ValueNode getArrayA()
public ValueNode getOffsetA()
public ValueNode getArrayB()
public ValueNode getOffsetB()
public JavaKind getStrideA()
public JavaKind getStrideB()
public ValueNode getLength()
public ValueNode getDynamicStrides()
public int getDirectStubCallIndex()
public void generate(NodeLIRBuilderTool gen)
generate in interface LIRLowerablepublic int getArrayBaseOffset(MetaAccessProvider metaAccess,
ValueNode array,
JavaKind elementKind)
getArrayBaseOffset in interface ConstantReflectionUtil.ArrayBaseOffsetProviderprotected void generateArrayRegionEquals(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()public ValueNode 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 MetaAccessProvider