[llvm] r213475 - Remove braces around single-statement block and rangify outer loop.
Manuel Jacob
me at manueljacob.de
Sun Jul 20 02:20:48 PDT 2014
Author: mjacob
Date: Sun Jul 20 04:20:47 2014
New Revision: 213475
URL: http://llvm.org/viewvc/llvm-project?rev=213475&view=rev
Log:
Remove braces around single-statement block and rangify outer loop.
This is a follow-up to r213474.
Modified:
llvm/trunk/lib/Analysis/BranchProbabilityInfo.cpp
Modified: llvm/trunk/lib/Analysis/BranchProbabilityInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BranchProbabilityInfo.cpp?rev=213475&r1=213474&r2=213475&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BranchProbabilityInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/BranchProbabilityInfo.cpp Sun Jul 20 04:20:47 2014
@@ -528,12 +528,9 @@ void BranchProbabilityInfo::print(raw_os
// 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 {
More information about the llvm-commits
mailing list