forked from OSchip/llvm-project
Tidy up a loop to be more idiomatic for LLVM's codebase, and remove some
extraneous whitespace. Trying to clean-up this pass as much as I can before I start making functional changes. llvm-svn: 142780
This commit is contained in:
parent
b05d9e9bea
commit
24cee10fb1
|
@ -424,34 +424,25 @@ bool BranchProbabilityAnalysis::calcFloatingPointHeuristics(BasicBlock *BB) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BranchProbabilityAnalysis::runOnFunction(Function &F) {
|
bool BranchProbabilityAnalysis::runOnFunction(Function &F) {
|
||||||
|
for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) {
|
||||||
for (Function::iterator I = F.begin(), E = F.end(); I != E; ) {
|
if (calcMetadataWeights(I))
|
||||||
BasicBlock *BB = I++;
|
|
||||||
|
|
||||||
if (calcMetadataWeights(BB))
|
|
||||||
continue;
|
continue;
|
||||||
|
if (calcLoopBranchHeuristics(I))
|
||||||
if (calcLoopBranchHeuristics(BB))
|
|
||||||
continue;
|
continue;
|
||||||
|
if (calcReturnHeuristics(I))
|
||||||
if (calcReturnHeuristics(BB))
|
|
||||||
continue;
|
continue;
|
||||||
|
if (calcPointerHeuristics(I))
|
||||||
if (calcPointerHeuristics(BB))
|
|
||||||
continue;
|
continue;
|
||||||
|
if (calcZeroHeuristics(I))
|
||||||
if (calcZeroHeuristics(BB))
|
|
||||||
continue;
|
continue;
|
||||||
|
calcFloatingPointHeuristics(I);
|
||||||
calcFloatingPointHeuristics(BB);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BranchProbabilityInfo::getAnalysisUsage(AnalysisUsage &AU) const {
|
void BranchProbabilityInfo::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
AU.addRequired<LoopInfo>();
|
AU.addRequired<LoopInfo>();
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BranchProbabilityInfo::runOnFunction(Function &F) {
|
bool BranchProbabilityInfo::runOnFunction(Function &F) {
|
||||||
|
|
Loading…
Reference in New Issue