LLVM 20.0.0git
|
#include "llvm/Support/BlockFrequency.h"
Static Public Member Functions | |
static BlockFrequency | max () |
Returns the maximum possible frequency, the saturation value. | |
Definition at line 26 of file BlockFrequency.h.
|
inline |
Definition at line 30 of file BlockFrequency.h.
|
inlineexplicit |
Definition at line 31 of file BlockFrequency.h.
|
inline |
Returns the frequency as a fixpoint number scaled by the entry frequency.
Definition at line 38 of file BlockFrequency.h.
Referenced by llvm::AsmPrinter::emitBBAddrMapSection(), llvm::RegBankSelect::MBBInsertPoint::frequency(), llvm::RegBankSelect::EdgeInsertPoint::frequency(), llvm::MachineBlockFrequencyInfo::getBlockFreqRelativeToEntryBlock(), llvm::BlockFrequencyInfoImplBase::getProfileCountFromFreq(), llvm::printRelativeBlockFreq(), llvm::BlockFrequencyInfoImplBase::setBlockFreq(), and llvm::BlockFrequencyInfo::setBlockFreqAndScale().
|
inlinestatic |
Returns the maximum possible frequency, the saturation value.
Definition at line 34 of file BlockFrequency.h.
References BlockFrequency(), and UINT64_MAX.
Referenced by llvm::SpillPlacement::Node::addBias().
std::optional< BlockFrequency > BlockFrequency::mul | ( | uint64_t | Factor | ) | const |
Multiplies frequency with Factor
. Returns nullopt
in case of overflow.
Definition at line 43 of file BlockFrequency.cpp.
References BlockFrequency(), and llvm::SaturatingMultiply().
|
inline |
Definition at line 118 of file BlockFrequency.h.
References RHS.
BlockFrequency BlockFrequency::operator* | ( | BranchProbability | Prob | ) | const |
Definition at line 26 of file BlockFrequency.cpp.
BlockFrequency & BlockFrequency::operator*= | ( | BranchProbability | Prob | ) |
Multiplies with a branch probability.
The computation will never overflow.
Definition at line 21 of file BlockFrequency.cpp.
References llvm::BranchProbability::scale().
|
inline |
Definition at line 61 of file BlockFrequency.h.
|
inline |
Adds another block frequency using saturating arithmetic.
Definition at line 51 of file BlockFrequency.h.
References Before, and UINT64_MAX.
|
inline |
Definition at line 76 of file BlockFrequency.h.
|
inline |
Subtracts another block frequency using saturating arithmetic.
Definition at line 68 of file BlockFrequency.h.
BlockFrequency BlockFrequency::operator/ | ( | BranchProbability | Prob | ) | const |
Definition at line 37 of file BlockFrequency.cpp.
BlockFrequency & BlockFrequency::operator/= | ( | BranchProbability | Prob | ) |
Divide by a non-zero branch probability using saturating arithmetic.
Definition at line 32 of file BlockFrequency.cpp.
References llvm::BranchProbability::scaleByInverse().
|
inline |
Definition at line 98 of file BlockFrequency.h.
References RHS.
|
inline |
Definition at line 102 of file BlockFrequency.h.
References RHS.
|
inline |
Definition at line 114 of file BlockFrequency.h.
References RHS.
|
inline |
Definition at line 106 of file BlockFrequency.h.
References RHS.
|
inline |
Definition at line 110 of file BlockFrequency.h.
References RHS.
|
inline |
Shift block frequency to the right by count digits saturating to 1.
Definition at line 86 of file BlockFrequency.h.
References assert(), and llvm::count().