Branch probability as a non‐negative fraction no greater than one.
Synopsis
Declared in <llvm/Support/BranchProbability.h>
class BranchProbability;
Description
Uses a fixed‐point‐like representation whose denominator is always the constant value 1<<31 for maximum precision.
Member Functions
Name |
Description |
|
Constructors |
Dump this probability to the debug stream. |
|
Return the complementary probability (1 minus this probability). |
|
Return the fixed‐point numerator of this probability. |
|
Return true if this probability is one (always taken). |
|
Return true if this probability is unknown. |
|
Return true if this probability is zero (never taken). |
|
Multiplication operators |
|
Multiplication assignment operators |
|
Add two branch probabilities, saturating at one. |
|
Add |
|
Subtract |
|
Subtract |
|
Division operators |
|
Division assignment operators |
|
Compute pow(Probability, N). |
|
Print this probability to |
|
Scale a large integer. |
|
Scale a large integer by the inverse. |
|
Return this probability as a floating‐point value in [0, 1]. |
|
Return true if this probability equals |
|
Return true if this probability differs from |
|
Return true if this probability is strictly less than |
|
Return true if this probability is less than or equal to |
|
Return true if this probability is greater than |
|
Return true if this probability is greater than or equal to |
Static Member Functions
Name |
Description |
|
|
Return the fixed denominator used by all branch probabilities ( |
|
Return a probability representing one (always taken). |
|
Create a probability from the raw fixed‐point numerator |
|
Return an unknown branch probability. |
|
Return a probability representing zero (never taken). |
|
|
Non-Member Functions
Name |
Description |
Return the probability that conditional branch |
|
Return the edge probability from |
|
Return the probability that the latch of |
|
Convert a branch probability into an unscaled edge weight. |
|
Scale mass |
Created with MrDocs