git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237284
91177308-0d34-0410-b5e6-
96231b3b80d8
bool MadeChange = false;
// Scan all the blocks in the loop that are not in subloops.
bool MadeChange = false;
// Scan all the blocks in the loop that are not in subloops.
- for (Loop::block_iterator BI = CurLoop->block_begin(),
- E = CurLoop->block_end(); BI != E; ++BI) {
+ for (auto BB : CurLoop->getBlocks()) {
// Ignore blocks in subloops.
// Ignore blocks in subloops.
- if (LI.getLoopFor(*BI) != CurLoop)
+ if (LI.getLoopFor(BB) != CurLoop)
- MadeChange |= runOnLoopBlock(*BI, BECount, ExitBlocks);
+ MadeChange |= runOnLoopBlock(BB, BECount, ExitBlocks);