LLVM API Documentation
#include <BranchProbability.h>
Public Member Functions | |
BranchProbability (uint32_t n, uint32_t d) | |
uint32_t | getNumerator () const |
uint32_t | getDenominator () const |
BranchProbability | getCompl () const |
raw_ostream & | print (raw_ostream &OS) const |
void | dump () const |
uint64_t | scale (uint64_t Num) const |
Scale a large integer. | |
uint64_t | scaleByInverse (uint64_t Num) const |
Scale a large integer by the inverse. | |
bool | operator== (BranchProbability RHS) const |
bool | operator!= (BranchProbability RHS) const |
bool | operator< (BranchProbability RHS) const |
bool | operator> (BranchProbability RHS) const |
bool | operator<= (BranchProbability RHS) const |
bool | operator>= (BranchProbability RHS) const |
Static Public Member Functions | |
static BranchProbability | getZero () |
static BranchProbability | getOne () |
Definition at line 25 of file BranchProbability.h.
llvm::BranchProbability::BranchProbability | ( | uint32_t | n, |
uint32_t | d | ||
) | [inline] |
Definition at line 33 of file BranchProbability.h.
Referenced by getCompl(), getOne(), and getZero().
void BranchProbability::dump | ( | ) | const |
Definition at line 26 of file BranchProbability.cpp.
References llvm::dbgs(), and print().
BranchProbability llvm::BranchProbability::getCompl | ( | ) | const [inline] |
Definition at line 45 of file BranchProbability.h.
References BranchProbability().
uint32_t llvm::BranchProbability::getDenominator | ( | ) | const [inline] |
Definition at line 42 of file BranchProbability.h.
Referenced by llvm::ARMBaseInstrInfo::isProfitableToIfCvt().
uint32_t llvm::BranchProbability::getNumerator | ( | ) | const [inline] |
Definition at line 41 of file BranchProbability.h.
Referenced by llvm::ARMBaseInstrInfo::isProfitableToIfCvt().
static BranchProbability llvm::BranchProbability::getOne | ( | ) | [inline, static] |
Definition at line 39 of file BranchProbability.h.
References BranchProbability().
static BranchProbability llvm::BranchProbability::getZero | ( | ) | [inline, static] |
Definition at line 38 of file BranchProbability.h.
References BranchProbability().
bool llvm::BranchProbability::operator!= | ( | BranchProbability | RHS | ) | const [inline] |
Definition at line 72 of file BranchProbability.h.
bool llvm::BranchProbability::operator< | ( | BranchProbability | RHS | ) | const [inline] |
Definition at line 75 of file BranchProbability.h.
bool llvm::BranchProbability::operator<= | ( | BranchProbability | RHS | ) | const [inline] |
Definition at line 79 of file BranchProbability.h.
bool llvm::BranchProbability::operator== | ( | BranchProbability | RHS | ) | const [inline] |
Definition at line 69 of file BranchProbability.h.
bool llvm::BranchProbability::operator> | ( | BranchProbability | RHS | ) | const [inline] |
Definition at line 78 of file BranchProbability.h.
bool llvm::BranchProbability::operator>= | ( | BranchProbability | RHS | ) | const [inline] |
Definition at line 80 of file BranchProbability.h.
raw_ostream & BranchProbability::print | ( | raw_ostream & | OS | ) | const |
Definition at line 21 of file BranchProbability.cpp.
References llvm::format().
Referenced by dump(), and llvm::operator<<().
uint64_t BranchProbability::scale | ( | uint64_t | Num | ) | const |
Scale a large integer.
Scales Num
. Guarantees full precision. Returns the floor of the result.
Num
times this
. Definition at line 67 of file BranchProbability.cpp.
Referenced by llvm::BlockFrequency::operator*=(), llvm::bfi_detail::BlockMass::operator*=(), and scaleByInverse().
uint64_t BranchProbability::scaleByInverse | ( | uint64_t | Num | ) | const |
Scale a large integer by the inverse.
Scales Num
by the inverse of this
. Guarantees full precision. Returns the floor of the result.
Num
divided by this
. Definition at line 71 of file BranchProbability.cpp.
References scale().
Referenced by llvm::BlockFrequency::operator/=().