LLVM API Documentation

Public Member Functions | Static Public Member Functions
llvm::BranchProbability Class Reference

#include <BranchProbability.h>

List of all members.

Public Member Functions

 BranchProbability (uint32_t n, uint32_t d)
uint32_t getNumerator () const
uint32_t getDenominator () const
BranchProbability getCompl () const
raw_ostreamprint (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 ()

Detailed Description

Definition at line 25 of file BranchProbability.h.


Constructor & Destructor Documentation

llvm::BranchProbability::BranchProbability ( uint32_t  n,
uint32_t  d 
) [inline]

Definition at line 33 of file BranchProbability.h.

Referenced by getCompl(), getOne(), and getZero().


Member Function Documentation

void BranchProbability::dump ( ) const

Definition at line 26 of file BranchProbability.cpp.

References llvm::dbgs(), and print().

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().

Definition at line 39 of file BranchProbability.h.

References BranchProbability().

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.

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.

Returns:
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.

Returns:
Num divided by this.

Definition at line 71 of file BranchProbability.cpp.

References scale().

Referenced by llvm::BlockFrequency::operator/=().


The documentation for this class was generated from the following files: