Skip to content

Commit 6ac56c2

Browse files
committed
rangify; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260151 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent c9a0177 commit 6ac56c2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/Transforms/Utils/LoopUnrollRuntime.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,11 @@ bool llvm::UnrollRuntimeLoopProlog(Loop *L, unsigned Count,
394394
F->getBasicBlockList().splice(PEnd->getIterator(), F->getBasicBlockList(),
395395
NewBlocks[0]->getIterator(), F->end());
396396

397-
// Rewrite the cloned instruction operands to use the values
398-
// created when the clone is created.
399-
for (unsigned i = 0, e = NewBlocks.size(); i != e; ++i) {
400-
for (BasicBlock::iterator I = NewBlocks[i]->begin(),
401-
E = NewBlocks[i]->end();
402-
I != E; ++I) {
403-
RemapInstruction(&*I, VMap,
397+
// Rewrite the cloned instruction operands to use the values created when the
398+
// clone is created.
399+
for (BasicBlock *BB : NewBlocks) {
400+
for (Instruction &I : *BB) {
401+
RemapInstruction(&I, VMap,
404402
RF_NoModuleLevelChanges | RF_IgnoreMissingEntries);
405403
}
406404
}

0 commit comments

Comments
 (0)