Switch the cost model analysis over to just the TTI interface.
[oota-llvm.git] / lib / Analysis / BlockFrequencyInfo.cpp
index ee899153e1dc5f34b954e2980b0450cf54daaef9..100e5c8ae7dd68d90a75e300b01611ca386b9563 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/InitializePasses.h"
-#include "llvm/Analysis/BlockFrequencyImpl.h"
 #include "llvm/Analysis/BlockFrequencyInfo.h"
+#include "llvm/Analysis/BlockFrequencyImpl.h"
+#include "llvm/Analysis/BranchProbabilityInfo.h"
 #include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Analysis/Passes.h"
-#include "llvm/Analysis/BranchProbabilityInfo.h"
+#include "llvm/InitializePasses.h"
 
 using namespace llvm;
 
@@ -49,11 +49,15 @@ bool BlockFrequencyInfo::runOnFunction(Function &F) {
   return false;
 }
 
+void BlockFrequencyInfo::print(raw_ostream &O, const Module *) const {
+  if (BFI) BFI->print(O);
+}
+
 /// 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 BlockFrequencyInfo::getBlockFreq(BasicBlock *BB) const {
+BlockFrequency BlockFrequencyInfo::getBlockFreq(const BasicBlock *BB) const {
   return BFI->getBlockFreq(BB);
 }