public enum NodeSize extends Enum<NodeSize>
Node.estimatedNodeSize(). Otherwise, just use the average of the different values (e.g.,
if AMD64 size is 5 and AArch64 is 1, use 3).
In general, the current sizes for nodes are based on domain knowledge and experience, including
machine-learning based tweaking. When adding a new node, it's best to look at the cost model for
similar nodes if unsure what values to specify. Benchmarking is also useful to tune model
parameters.| Enum Constant and Description |
|---|
SIZE_0
Nodes that do not require any code to be generated in order to be "executed", e.g.
|
SIZE_1 |
SIZE_1024 |
SIZE_128 |
SIZE_16 |
SIZE_2 |
SIZE_256 |
SIZE_32 |
SIZE_4 |
SIZE_512 |
SIZE_64 |
SIZE_8 |
SIZE_IGNORED
Nodes for which code size information is irrelevant and can be ignored, e.g.
|
SIZE_UNKNOWN
Nodes for which, due to arbitrary reasons, no estimation can be made either (1) statically
without inspecting the properties of a node or (2) at all (like e.g.
|
SIZE_UNSET
The default value of the
NodeInfo.size() property. |
| Modifier and Type | Field and Description |
|---|---|
static int |
IGNORE_SIZE_CONTRACT_FACTOR |
int |
value |
| Modifier and Type | Method and Description |
|---|---|
static NodeSize |
compute(int rawValue) |
static NodeSize |
compute(NodeSize base,
int opCount) |
static NodeSize |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NodeSize[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NodeSize SIZE_UNSET
NodeInfo.size() property.
For further information about the use of SIZE_UNSET see NodeInfo.size().
public static final NodeSize SIZE_UNKNOWN
Nodes annotated with SIZE_UNKNOWN should specify the NodeInfo.sizeRationale()
property to clarify why an estimation cannot be done.
public static final NodeSize SIZE_IGNORED
public static final NodeSize SIZE_0
public static final NodeSize SIZE_1
public static final NodeSize SIZE_2
public static final NodeSize SIZE_4
public static final NodeSize SIZE_8
public static final NodeSize SIZE_16
public static final NodeSize SIZE_32
public static final NodeSize SIZE_64
public static final NodeSize SIZE_128
public static final NodeSize SIZE_256
public static final NodeSize SIZE_512
public static final NodeSize SIZE_1024
public final int value
public static final int IGNORE_SIZE_CONTRACT_FACTOR
public static NodeSize[] values()
public static NodeSize 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 nullpublic static NodeSize compute(int rawValue)