[llvm] r184609 - Reapply documentation changes from r184584.
Benjamin Kramer
benny.kra at googlemail.com
Fri Jun 21 16:45:18 PDT 2013
Author: d0k
Date: Fri Jun 21 18:45:18 2013
New Revision: 184609
URL: http://llvm.org/viewvc/llvm-project?rev=184609&view=rev
Log:
Reapply documentation changes from r184584.
Modified:
llvm/trunk/include/llvm/Support/BlockFrequency.h
Modified: llvm/trunk/include/llvm/Support/BlockFrequency.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/BlockFrequency.h?rev=184609&r1=184608&r2=184609&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/BlockFrequency.h (original)
+++ llvm/trunk/include/llvm/Support/BlockFrequency.h Fri Jun 21 18:45:18 2013
@@ -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;
More information about the llvm-commits
mailing list