LTO API: add lto_module_create_from_memory_with_path.
[oota-llvm.git] / include / llvm / Analysis / BlockFrequencyInfo.h
index 9e698a9f4bb1d065f4c0520e6444210163a5ffaa..e594448f478975e622d6229050ee0c56c2f2cc36 100644 (file)
@@ -1,4 +1,4 @@
-//========-------- BlockFrequencyInfo.h - Block Frequency Analysis -------========//
+//===------- BlockFrequencyInfo.h - Block Frequency Analysis --*- C++ -*---===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -41,13 +41,26 @@ public:
 
   bool runOnFunction(Function &F);
   void print(raw_ostream &O, const Module *M) const;
+  const Function *getFunction() const;
+  void view() const;
 
   /// getblockFreq - Return block frequency. Return 0 if we don't have the
-  /// information. Please note that initial frequency is equal to 1024. It means
-  /// that we should not rely on the value itself, but only on the comparison to
-  /// the other block frequencies. We do this to avoid using of floating points.
-  ///
-  BlockFrequency getBlockFreq(BasicBlock *BB) const;
+  /// information. Please note that initial frequency is equal to ENTRY_FREQ. It
+  /// means that we should not rely on the value itself, but only on the
+  /// comparison to the other block frequencies. We do this to avoid using of
+  /// floating points.
+  BlockFrequency getBlockFreq(const BasicBlock *BB) const;
+
+  // Print the block frequency Freq to OS using the current functions entry
+  // frequency to convert freq into a relative decimal form.
+  raw_ostream &printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const;
+
+  // Convenience method that attempts to look up the frequency associated with
+  // BB and print it to OS.
+  raw_ostream &printBlockFreq(raw_ostream &OS, const BasicBlock *BB) const;
+
+  uint64_t getEntryFreq() const;
+
 };
 
 }