public final class InlinedDoubleValueProfile extends InlinedProfile
byte
runtime values.
Value profiles require a runtime check in their initialized state to verify their profiled
assumption. Value profiles are limited to capture monomorphic profiles only. This means that if
two or more values are profiled within a single profile then the profile has no effect. If the
value assumption is invalidated in compiled code then it is invalidated.
Usage example:
abstract class DoubleProfileNode extends Node { abstract double execute(double input); @Specialization double doDefault(double input, @Cached InlinedDoubleValueProfile profile) { double profiledValue = profile.profile(this, input); // compiler may now see profiledValue as a partial evaluation constant return profiledValue; } }
Modifier and Type | Field and Description |
---|---|
protected static int |
GENERIC |
protected static int |
REQUIRED_STATE_BITS |
protected static int |
SPECIALIZED |
protected InlineSupport.StateField |
state |
protected static int |
UNINITIALIZED |
Modifier and Type | Method and Description |
---|---|
void |
disable(Node node)
Disables this profile by setting it to its generic state.
|
static InlinedDoubleValueProfile |
getUncached()
Returns the uncached version of the profile.
|
static InlinedDoubleValueProfile |
inline(InlineSupport.InlineTarget target)
Returns an inlined version of the profile.
|
double |
profile(Node node,
double value) |
void |
reset(Node node)
Resets this profile to its uninitialized state.
|
String |
toString(Node node)
Prints a string representation of this inlined profile given a target node.
|
toString
protected static final int UNINITIALIZED
protected static final int SPECIALIZED
protected static final int GENERIC
protected static final int REQUIRED_STATE_BITS
protected final InlineSupport.StateField state
public double profile(Node node, double value)
public String toString(Node node)
toString
in class InlinedProfile
public static InlinedDoubleValueProfile inline(InlineSupport.InlineTarget target)
public static InlinedDoubleValueProfile getUncached()
public final void disable(Node node)
InlinedProfile
deoptimize
on any
invocation of a profile method.
This method must not be called on compiled code paths. Note that disabling the profile will not invalidate existing compiled code that uses this profile.
disable
in class InlinedProfile
public final void reset(Node node)
InlinedProfile
This method must not be called on compiled code paths. Note that disabling the profile will not invalidate existing compiled code that uses this profile.
reset
in class InlinedProfile