diff options
Diffstat (limited to 'include/llvm/Support/BlockFrequency.h')
-rw-r--r-- | include/llvm/Support/BlockFrequency.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/include/llvm/Support/BlockFrequency.h b/include/llvm/Support/BlockFrequency.h index 21879e7..dae520b 100644 --- a/include/llvm/Support/BlockFrequency.h +++ b/include/llvm/Support/BlockFrequency.h @@ -25,7 +25,6 @@ class BranchProbability; class BlockFrequency { uint64_t Frequency; - static const int64_t ENTRY_FREQ = 1 << 14; /// \brief Scale the given BlockFrequency by N/D. Return the remainder from /// the division by D. Upon overflow, the routine will saturate and @@ -35,9 +34,6 @@ class BlockFrequency { public: BlockFrequency(uint64_t Freq = 0) : Frequency(Freq) { } - /// \brief Returns the frequency of the entry block of the function. - static uint64_t getEntryFrequency() { return ENTRY_FREQ; } - /// \brief Returns the maximum possible frequency, the saturation value. static uint64_t getMaxFrequency() { return -1ULL; } @@ -59,6 +55,9 @@ public: BlockFrequency &operator+=(const BlockFrequency &Freq); const BlockFrequency operator+(const BlockFrequency &Freq) const; + /// \brief Shift block frequency to the right by count digits saturating to 1. + BlockFrequency &operator>>=(const unsigned count); + /// \brief Scale the given BlockFrequency by N/D. Return the remainder from /// the division by D. Upon overflow, the routine will saturate. uint32_t scale(const BranchProbability &Prob); @@ -78,12 +77,8 @@ public: bool operator>=(const BlockFrequency &RHS) const { return Frequency >= RHS.Frequency; } - - void print(raw_ostream &OS) const; }; -raw_ostream &operator<<(raw_ostream &OS, const BlockFrequency &Freq); - } #endif |