public static enum ArrayLengthProvider.FindLengthMode extends Enum<ArrayLengthProvider.FindLengthMode>
GraphUtil.arrayLength(org.graalvm.compiler.nodes.ValueNode, org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) and
ArrayLengthProvider.findLength(org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) can be used for.| Enum Constant and Description |
|---|
CANONICALIZE_READ
Use the result of
GraphUtil.arrayLength(org.graalvm.compiler.nodes.ValueNode, org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) and
ArrayLengthProvider.findLength(org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) to replace the explicit load of the array length
with a node that does not involve a memory access of the array length. |
SEARCH_ONLY
Use the result of
GraphUtil.arrayLength(org.graalvm.compiler.nodes.ValueNode, org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) and
ArrayLengthProvider.findLength(org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) only for decisions whether a certain optimization
is possible. |
| Modifier and Type | Method and Description |
|---|---|
static ArrayLengthProvider.FindLengthMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ArrayLengthProvider.FindLengthMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ArrayLengthProvider.FindLengthMode CANONICALIZE_READ
GraphUtil.arrayLength(org.graalvm.compiler.nodes.ValueNode, org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) and
ArrayLengthProvider.findLength(org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) to replace the explicit load of the array length
with a node that does not involve a memory access of the array length.
Values that are defined inside a loop and flow out the loop need to be proxied by
ValueProxyNode. When this mode is used, new necessary proxy nodes are created
based on the proxies that were found while traversing the path to the length node. In
addition, new phi nodes can be created. The caller is responsible
for adding these nodes to the graph, i.e., the return value can be a node that is not yet
added to the graph.public static final ArrayLengthProvider.FindLengthMode SEARCH_ONLY
GraphUtil.arrayLength(org.graalvm.compiler.nodes.ValueNode, org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) and
ArrayLengthProvider.findLength(org.graalvm.compiler.nodes.spi.ArrayLengthProvider.FindLengthMode, ConstantReflectionProvider) only for decisions whether a certain optimization
is possible. No new nodes are created during the search, i.e., the result is either a
node that is already in the graph, or null.public static ArrayLengthProvider.FindLengthMode[] values()
public static ArrayLengthProvider.FindLengthMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null