Remove braces around single-statement block and rangify outer loop.

This is a follow-up to r213474.

llvm-svn: 213475
This commit is contained in:
Manuel Jacob 2014-07-20 09:20:47 +00:00
parent d11beffef4
commit 6d5cc8d656
1 changed files with 3 additions and 6 deletions

View File

@ -528,12 +528,9 @@ void BranchProbabilityInfo::print(raw_ostream &OS, const Module *) const {
// We print the probabilities from the last function the analysis ran over,
// or the function it is currently running over.
assert(LastF && "Cannot print prior to running over a function");
for (Function::const_iterator BI = LastF->begin(), BE = LastF->end();
BI != BE; ++BI) {
for (const BasicBlock *Succ : successors(BI)) {
printEdgeProbability(OS << " ", BI, Succ);
}
}
for (const BasicBlock &BB : *LastF)
for (const BasicBlock *Succ : successors(&BB))
printEdgeProbability(OS << " ", &BB, Succ);
}
uint32_t BranchProbabilityInfo::getSumForBlock(const BasicBlock *BB) const {