Remove "LoopInfo.h" include from BranchProbabilityInfo.h.

llvm-svn: 135353
This commit is contained in:
Jakub Staszak 2011-07-16 20:31:15 +00:00
parent a0010953f7
commit 7bd3be24d8
2 changed files with 8 additions and 5 deletions

View File

@ -15,8 +15,9 @@
#define LLVM_ANALYSIS_BRANCHPROBABILITYINFO_H
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/BranchProbability.h"
#include "llvm/Analysis/LoopInfo.h"
namespace llvm {
@ -46,10 +47,7 @@ public:
initializeBranchProbabilityInfoPass(*PassRegistry::getPassRegistry());
}
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
AU.setPreservesAll();
}
void getAnalysisUsage(AnalysisUsage &AU) const;
bool runOnFunction(Function &F);

View File

@ -13,6 +13,7 @@
#include "llvm/Instructions.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Support/Debug.h"
using namespace llvm;
@ -257,6 +258,10 @@ bool BranchProbabilityAnalysis::runOnFunction(Function &F) {
return false;
}
void BranchProbabilityInfo::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
AU.setPreservesAll();
}
bool BranchProbabilityInfo::runOnFunction(Function &F) {
LoopInfo &LI = getAnalysis<LoopInfo>();