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:
Chandler Carruth 2011-10-23 22:40:13 +00:00
parent b05d9e9bea
commit 24cee10fb1
1 changed files with 9 additions and 18 deletions

View File

@ -424,28 +424,19 @@ bool BranchProbabilityAnalysis::calcFloatingPointHeuristics(BasicBlock *BB) {
}
bool BranchProbabilityAnalysis::runOnFunction(Function &F) {
for (Function::iterator I = F.begin(), E = F.end(); I != E; ) {
BasicBlock *BB = I++;
if (calcMetadataWeights(BB))
for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) {
if (calcMetadataWeights(I))
continue;
if (calcLoopBranchHeuristics(BB))
if (calcLoopBranchHeuristics(I))
continue;
if (calcReturnHeuristics(BB))
if (calcReturnHeuristics(I))
continue;
if (calcPointerHeuristics(BB))
if (calcPointerHeuristics(I))
continue;
if (calcZeroHeuristics(BB))
if (calcZeroHeuristics(I))
continue;
calcFloatingPointHeuristics(BB);
calcFloatingPointHeuristics(I);
}
return false;
}