struct BlockFrequencyInfoImplBase::Distribution
Declaration
struct BlockFrequencyInfoImplBase::Distribution { /* full declaration omitted */ };
Description
Distribution of unscaled probability weight. Distribution of unscaled probability weight to a set of successors. This class collates the successor edge weights for later processing. \a DidOverflow indicates whether \a Total did overflow while adding to the distribution. It should never overflow twice.
Declared at: llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h:375
Member Variables
- public llvm::BlockFrequencyInfoImplBase::Distribution:: WeightList Weights
- Individual successor weights.
- public uint64_t Total = 0
- Sum of all weights.
- public bool DidOverflow = false
- Whether \a Total did overflow.
Method Overview
- public Distribution()
- public void addBackedge(const llvm::BlockFrequencyInfoImplBase::BlockNode & Node, uint64_t Amount)
- public void addExit(const llvm::BlockFrequencyInfoImplBase::BlockNode & Node, uint64_t Amount)
- public void addLocal(const llvm::BlockFrequencyInfoImplBase::BlockNode & Node, uint64_t Amount)
- public void normalize()
Methods
¶Distribution()
Distribution()
Declared at: llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h:382
¶void addBackedge(
const llvm::BlockFrequencyInfoImplBase::
BlockNode& Node,
uint64_t Amount)
void addBackedge(
const llvm::BlockFrequencyInfoImplBase::
BlockNode& Node,
uint64_t Amount)
Declared at: llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h:392
Parameters
- const llvm::BlockFrequencyInfoImplBase::BlockNode& Node
- uint64_t Amount
¶void addExit(
const llvm::BlockFrequencyInfoImplBase::
BlockNode& Node,
uint64_t Amount)
void addExit(
const llvm::BlockFrequencyInfoImplBase::
BlockNode& Node,
uint64_t Amount)
Declared at: llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h:388
Parameters
- const llvm::BlockFrequencyInfoImplBase::BlockNode& Node
- uint64_t Amount
¶void addLocal(
const llvm::BlockFrequencyInfoImplBase::
BlockNode& Node,
uint64_t Amount)
void addLocal(
const llvm::BlockFrequencyInfoImplBase::
BlockNode& Node,
uint64_t Amount)
Declared at: llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h:384
Parameters
- const llvm::BlockFrequencyInfoImplBase::BlockNode& Node
- uint64_t Amount
¶void normalize()
void normalize()
Description
Normalize the distribution. Combines multiple edges to the same \a Weight::TargetNode and scales down so that \a Total fits into 32-bits. This is linear in the size of \a Weights. For the vast majority of cases, adjacent edge weights are combined by sorting WeightList and combining adjacent weights. However, for very large edge lists an auxiliary hash table is used.
Declared at: llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h:405