public final class NodeStrideUtil extends Object
ArrayRegionCompareToNode. These intrinsics may
work with fixed strides of 1, 2 or 4 bytes per element, or with a dynamic parameter containing
the stride in log2 format, i.e. 0 -> 1 byte, 1 -> 2 byte, 2 -> 4 byte. If an intrinsic
method has two array parameters with potentially different strides, both log2 stride values are
encoded into one as follows: (strideA * N_STRIDES) + strideB. This value is used inside
the intrinsic as a jump table index to dispatch to separately compiled versions for each possible
combination of strides.| Constructor and Description |
|---|
NodeStrideUtil() |
| Modifier and Type | Method and Description |
|---|---|
static JavaKind |
getConstantStrideA(ValueNode dynamicStrides,
JavaKind strideA)
If the constant stride parameter
strideA is non-null, return it. |
static JavaKind |
getConstantStrideB(ValueNode dynamicStrides,
JavaKind strideB)
If the constant stride parameter
strideB is non-null, return it. |
static int |
getDirectStubCallIndex(ValueNode dynamicStrides,
JavaKind strideA,
JavaKind strideB)
If the constant stride parameters
strideA and strideB are non-null, construct
a direct stub call index from them. |
public static JavaKind getConstantStrideA(ValueNode dynamicStrides, JavaKind strideA)
strideA is non-null, return it. Otherwise, extract
strideA from the constant direct stub call index value dynamicStrides.public static JavaKind getConstantStrideB(ValueNode dynamicStrides, JavaKind strideB)
strideB is non-null, return it. Otherwise, extract
strideB from the constant direct stub call index value dynamicStrides.public static int getDirectStubCallIndex(ValueNode dynamicStrides, JavaKind strideA, JavaKind strideB)
strideA and strideB are non-null, construct
a direct stub call index from them. Otherwise, return the direct stub call index contained in
dynamicStrides, if it is constant. If dynamicStrides is not constant, return
-1.