LLVM: llvm::bfi_detail::BlockMass Class Reference (original) (raw)
Mass of a block.
This class implements a sort of fixed-point fraction always between 0.0 and 1.0. getMass() == std::numeric_limits<uint64_t>::max() indicates a value of 1.0.
Masses can be added and subtracted. Simple saturation arithmetic is used, so arithmetic operations never overflow or underflow.
Masses can be multiplied. Multiplication treats full mass as 1.0 and uses an inexpensive floating-point algorithm that's off-by-one (almost, but not quite, maximum precision).
Masses can be scaled by BranchProbability at maximum precision.
Definition at line 89 of file BlockFrequencyInfoImpl.h.