llvm::BranchProbabilityInfo::getEdgeProbability

getEdgeProbability overloads

Synopses

Declared in <llvm/Analysis/BranchProbabilityInfo.h>

Get an edge's probability, relative to other out-edges of the Src.

BranchProbability
getEdgeProbability(
    BasicBlock const* Src,
    unsigned int IndexInSuccessors) const;
» more...

Get the probability of going from Src to Dst.

BranchProbability
getEdgeProbability(
    BasicBlock const* Src,
    BasicBlock const* Dst) const;
» more...

Return Value

  • Relative probability of the edge, never zero.
  • Sum of probabilities of all edges from Src to Dst.

Parameters

NameDescription
SrcSource block of the edge.
IndexInSuccessorsIndex of the successor edge leaving Src.
DstDestination block of the edge(s).