public final class InlinedConditionProfile extends InlinedProfile
InlinedCountingConditionProfile instead.
Usage example:
abstract class AbsoluteNode extends Node {
abstract void execute(int value);
@Specialization
int doDefault(int value,
@Cached InlinedConditionProfile p) {
if (p.profile(this, value >= 0)) {
return value;
} else {
return -value;
}
}
}
| Modifier and Type | Method and Description |
|---|---|
void |
disable(Node node)
Disables this profile by setting it to its generic state.
|
static InlinedConditionProfile |
getUncached()
Returns the uncached version of the profile.
|
static InlinedConditionProfile |
inline(InlineSupport.InlineTarget target)
Returns an inlined version of the profile.
|
boolean |
profile(Node node,
boolean 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.
|
boolean |
wasFalse(Node node)
Returns
true if the InlinedConditionProfile.profile(Node, boolean) method ever received a
false value, otherwise false. |
boolean |
wasTrue(Node node)
Returns
true if the InlinedConditionProfile.profile(Node, boolean) method ever received a
true value, otherwise false. |
toStringpublic boolean profile(Node node, boolean value)
public boolean wasTrue(Node node)
true if the InlinedConditionProfile.profile(Node, boolean) method ever received a
true value, otherwise false. For profiles with profiling disabled
or uncached profiles this method always returns true.public boolean wasFalse(Node node)
true if the InlinedConditionProfile.profile(Node, boolean) method ever received a
false value, otherwise false. For profiles with profiling disabled
or uncached profiles this method always returns true.public void disable(Node node)
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 InlinedProfilepublic void reset(Node node)
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 InlinedProfilepublic String toString(Node node)
toString in class InlinedProfilepublic static InlinedConditionProfile inline(InlineSupport.InlineTarget target)
public static InlinedConditionProfile getUncached()