public static final class ProfileData.BranchProbabilityData extends ProfileData
IfNode
or WithExceptionNode. When used for a branch, the probability stored within is the
probability of a "designated" successor (e.g., the true or non-exceptional
successor), the other successor's probability can be computed from it.
As instances of this class are immutable, any of the smart constructors may return shared
instances.ProfileData.BranchProbabilityData, ProfileData.LoopFrequencyData, ProfileData.ProfileSource, ProfileData.SwitchProbabilityDataprofileSource| Modifier and Type | Method and Description |
|---|---|
ProfileData.BranchProbabilityData |
combineAndWithNegated(ProfileData.BranchProbabilityData other)
Computes combined profile data for not short-circuiting evaluation of
this && !other. |
static ProfileData.BranchProbabilityData |
combineShortCircuitOr(ProfileData.BranchProbabilityData a,
ProfileData.BranchProbabilityData b)
Computes combined profile data for short-circuiting evaluation of
a || b. |
ProfileData.BranchProbabilityData |
copy(double newProbability) |
static ProfileData.BranchProbabilityData |
create(double designatedSuccessorProbability,
ProfileData.ProfileSource profileSource)
Returns a profile data object with the given designated successor probability and profile
source.
|
double |
getDesignatedSuccessorProbability() |
double |
getNegatedProbability() |
static ProfileData.BranchProbabilityData |
injected(double probability) |
static ProfileData.BranchProbabilityData |
injected(double probability,
boolean negated) |
ProfileData.BranchProbabilityData |
negated() |
static ProfileData.BranchProbabilityData |
profiled(double probability) |
String |
toString() |
static ProfileData.BranchProbabilityData |
unknown()
Returns a singleton branch profile object with an unknown source and designated successor
probability 0.5.
|
static ProfileData.BranchProbabilityData |
unknown(double probability)
Returns a branch profile object with an unknown source and the given designated successor
probability.
|
getProfileSourcepublic static ProfileData.BranchProbabilityData create(double designatedSuccessorProbability, ProfileData.ProfileSource profileSource)
public double getDesignatedSuccessorProbability()
public double getNegatedProbability()
public ProfileData.BranchProbabilityData copy(double newProbability)
public ProfileData.BranchProbabilityData negated()
public static ProfileData.BranchProbabilityData injected(double probability)
public static ProfileData.BranchProbabilityData injected(double probability, boolean negated)
public static ProfileData.BranchProbabilityData profiled(double probability)
public static ProfileData.BranchProbabilityData unknown()
public static ProfileData.BranchProbabilityData unknown(double probability)
ProfileData.BranchProbabilityData.unknown() instead to get a profile object
with equal successor probabilities.public static ProfileData.BranchProbabilityData combineShortCircuitOr(ProfileData.BranchProbabilityData a, ProfileData.BranchProbabilityData b)
a || b.public ProfileData.BranchProbabilityData combineAndWithNegated(ProfileData.BranchProbabilityData other)
this && !other.