From 2ea475cddf42ce3421f0463be670c77c93329b2c Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 21 Jun 2013 23:45:18 +0000 Subject: [PATCH] Reapply documentation changes from r184584. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184609 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/BlockFrequency.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/llvm/Support/BlockFrequency.h b/include/llvm/Support/BlockFrequency.h index 839cf937124..77b1bf44138 100644 --- a/include/llvm/Support/BlockFrequency.h +++ b/include/llvm/Support/BlockFrequency.h @@ -30,12 +30,19 @@ 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 frequency as a fixpoint number scaled by the entry + /// frequency. uint64_t getFrequency() const { return Frequency; } + /// \brief Multiplies with a branch probability. The computation will never + /// overflow. BlockFrequency &operator*=(const BranchProbability &Prob); const BlockFrequency operator*(const BranchProbability &Prob) const; + /// \brief Adds another block frequency using saturating arithmetic. BlockFrequency &operator+=(const BlockFrequency &Freq); const BlockFrequency operator+(const BlockFrequency &Freq) const; -- 2.34.1