Return the edge probability from Src to successor Dst.
Declared in <llvm/Transforms/Utils/LoopUtils.h>
BranchProbability
getBranchProbability(
BasicBlock* Src,
BasicBlock* Dst);
Calculates the edge probability from Src to Dst. Dst has to be a successor to Src. This uses branch_weights metadata directly. If data are missing or probability cannot be computed, then unknown probability is returned. This does not use BranchProbabilityInfo and the values computed by this will vary from BPI because BPI has its own more advanced heuristics to determine probabilities even without branch_weights metadata.
The edge probability from Src to Dst, or unknown if unavailable.
| Name | Description |
|---|---|
| Src | Source basic block of the CFG edge. |
| Dst | Successor basic block of the CFG edge. |