public class FixedNodeRelativeFrequencyCache extends Object implements ToDoubleFunction<FixedNode>
AbstractBeginNodes.| Constructor and Description |
|---|
FixedNodeRelativeFrequencyCache() |
| Modifier and Type | Method and Description |
|---|---|
double |
applyAsDouble(FixedNode node)
Given a
FixedNode this method finds the most immediate AbstractBeginNode
preceding it that either:
has no predecessor (ie, the begin-node is a merge, in particular a loop-begin, or the
start-node)
has a control-split predecessor
|
public double applyAsDouble(FixedNode node)
Given a FixedNode this method finds the most immediate AbstractBeginNode
preceding it that either:
The thus found AbstractBeginNode is equi-probable with the FixedNode it was
obtained from. When computed for the first time (afterwards a cache lookup returns it) that
relative frequency is computed as follows, again depending on the begin-node's predecessor:
As an exception to all the above, a frequency of 1 is assumed for a FixedNode that
appears to be dead-code (ie, lacks a predecessor).
applyAsDouble in interface ToDoubleFunction<FixedNode>