14 #ifndef LLVM_SUPPORT_BLOCKFREQUENCY_H 15 #define LLVM_SUPPORT_BLOCKFREQUENCY_H 60 return Frequency < RHS.Frequency;
64 return Frequency <= RHS.Frequency;
68 return Frequency > RHS.Frequency;
72 return Frequency >= RHS.Frequency;
76 return Frequency == RHS.Frequency;
This class represents lattice values for constants.
bool operator==(BlockFrequency RHS) const
uint64_t getFrequency() const
Returns the frequency as a fixpoint number scaled by the entry frequency.
bool operator<(BlockFrequency RHS) const
BlockFrequency operator*(BranchProbability Prob) const
BlockFrequency & operator/=(BranchProbability Prob)
Divide by a non-zero branch probability using saturating arithmetic.
BlockFrequency operator/(BranchProbability Prob) const
BlockFrequency(uint64_t Freq=0)
auto count(R &&Range, const E &Element) -> typename std::iterator_traits< decltype(adl_begin(Range))>::difference_type
Wrapper function around std::count to count the number of times an element Element occurs in the give...
BlockFrequency & operator+=(BlockFrequency Freq)
Adds another block frequency using saturating arithmetic.
bool operator<=(BlockFrequency RHS) const
bool operator>(BlockFrequency RHS) const
BlockFrequency operator+(BlockFrequency Freq) const
BlockFrequency operator-(BlockFrequency Freq) const
BlockFrequency & operator-=(BlockFrequency Freq)
Subtracts another block frequency using saturating arithmetic.
BlockFrequency & operator*=(BranchProbability Prob)
Multiplies with a branch probability.
static uint64_t getMaxFrequency()
Returns the maximum possible frequency, the saturation value.
bool operator>=(BlockFrequency RHS) const
BlockFrequency & operator>>=(const unsigned count)
Shift block frequency to the right by count digits saturating to 1.