Reapply documentation changes from r184584.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 21 Jun 2013 23:45:18 +0000 (23:45 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 21 Jun 2013 23:45:18 +0000 (23:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184609 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/BlockFrequency.h

index 839cf93712472df359670ad07ae5dfc081f90891..77b1bf44138a94625f0cf4325dc84cea4e0c8953 100644 (file)
@@ -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;