mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-09 10:20:34 +00:00
[LoopIdiomRecognize] Use auto + range-based loop. NFC intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -639,13 +639,12 @@ bool LoopIdiomRecognize::runOnCountableLoop() {
|
|||||||
|
|
||||||
bool MadeChange = false;
|
bool MadeChange = false;
|
||||||
// Scan all the blocks in the loop that are not in subloops.
|
// Scan all the blocks in the loop that are not in subloops.
|
||||||
for (Loop::block_iterator BI = CurLoop->block_begin(),
|
for (auto BB : CurLoop->getBlocks()) {
|
||||||
E = CurLoop->block_end(); BI != E; ++BI) {
|
|
||||||
// Ignore blocks in subloops.
|
// Ignore blocks in subloops.
|
||||||
if (LI.getLoopFor(*BI) != CurLoop)
|
if (LI.getLoopFor(BB) != CurLoop)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
MadeChange |= runOnLoopBlock(*BI, BECount, ExitBlocks);
|
MadeChange |= runOnLoopBlock(BB, BECount, ExitBlocks);
|
||||||
}
|
}
|
||||||
return MadeChange;
|
return MadeChange;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user