public final class BranchProbabilityNode extends FloatingNode implements Simplifiable, Lowerable
Node.ConstantNodeParameter, Node.InjectedNodeParameter, Node.Input, Node.NodeIntrinsic, Node.OptionalInput, Node.Successor, Node.ValueNumberable
Modifier and Type | Field and Description |
---|---|
(package private) ValueNode |
condition |
static double |
FAST_PATH_PROBABILITY |
static double |
FREQUENT_PROBABILITY |
static double |
LIKELY_PROBABILITY |
static double |
NOT_FREQUENT_PROBABILITY |
static double |
NOT_LIKELY_PROBABILITY |
(package private) ValueNode |
probability |
static double |
SLOW_PATH_PROBABILITY |
static NodeClass<BranchProbabilityNode> |
TYPE |
static double |
VERY_FAST_PATH_PROBABILITY |
static double |
VERY_SLOW_PATH_PROBABILITY |
NODE_LIST, NOT_ITERABLE, USE_UNSAFE_TO_CLONE, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges
Constructor and Description |
---|
BranchProbabilityNode(ValueNode probability,
ValueNode condition) |
Modifier and Type | Method and Description |
---|---|
ValueNode |
getCondition() |
ValueNode |
getProbability() |
private boolean |
isSubstitutionGraph() |
void |
lower(LoweringTool tool)
Expand this node into lower level nodes expressing the same semantics.
|
static boolean |
probability(double probability,
boolean condition)
This intrinsic should only be used for the condition of an if statement.
|
void |
simplify(SimplifierTool tool)
Must be overridden by subclasses that implement
Simplifiable . |
asNode
asConstant, asJavaConstant, getKind, graph, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isNullConstant, setStamp, stamp, updateStamp
acceptInputs, acceptSuccessors, afterClone, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearSuccessors, copyWithInputs, copyWithInputs, equals, fail, formatTo, getDebugProperties, getDebugProperties, getId, getNodeClass, getUsageAt, getUsageCount, hashCode, hasNoUsages, hasUsages, inputs, isAlive, isDeleted, markDeleted, modCount, newIdentityMap, newIdentityMap, newIdentityMap, newMap, newMap, newMap, newSet, newSet, predecessor, pushInputs, removeUsage, replaceAndDelete, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceFirstInput, replaceFirstSuccessor, safeDelete, successors, toString, toString, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verify, verifyEdges, verifyInputs
public static final NodeClass<BranchProbabilityNode> TYPE
public static final double LIKELY_PROBABILITY
public static final double NOT_LIKELY_PROBABILITY
public static final double FREQUENT_PROBABILITY
public static final double NOT_FREQUENT_PROBABILITY
public static final double FAST_PATH_PROBABILITY
public static final double SLOW_PATH_PROBABILITY
public static final double VERY_FAST_PATH_PROBABILITY
public static final double VERY_SLOW_PATH_PROBABILITY
ValueNode probability
public BranchProbabilityNode(ValueNode probability, ValueNode condition)
public ValueNode getProbability()
public ValueNode getCondition()
public void simplify(SimplifierTool tool)
Node
Simplifiable
. The implementation in
Node
exists to obviate the need to cast a node before invoking
Simplifiable.simplify(SimplifierTool)
.simplify
in interface Simplifiable
simplify
in class Node
private boolean isSubstitutionGraph()
public static boolean probability(double probability, boolean condition)
probability
- the probability that the given condition is true as a double value between
0.0 and 1.0.condition
- the simple condition without any && or || operatorspublic void lower(LoweringTool tool)
Lowerable