[llvm] r260151 - rangify; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 13:32:43 PST 2016


Author: spatel
Date: Mon Feb  8 15:32:43 2016
New Revision: 260151

URL: http://llvm.org/viewvc/llvm-project?rev=260151&view=rev
Log:
rangify; NFC

Modified:
    llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp

Modified: llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp?rev=260151&r1=260150&r2=260151&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp Mon Feb  8 15:32:43 2016
@@ -394,13 +394,11 @@ bool llvm::UnrollRuntimeLoopProlog(Loop
   F->getBasicBlockList().splice(PEnd->getIterator(), F->getBasicBlockList(),
                                 NewBlocks[0]->getIterator(), F->end());
 
-  // Rewrite the cloned instruction operands to use the values
-  // created when the clone is created.
-  for (unsigned i = 0, e = NewBlocks.size(); i != e; ++i) {
-    for (BasicBlock::iterator I = NewBlocks[i]->begin(),
-                              E = NewBlocks[i]->end();
-         I != E; ++I) {
-      RemapInstruction(&*I, VMap,
+  // Rewrite the cloned instruction operands to use the values created when the
+  // clone is created.
+  for (BasicBlock *BB : NewBlocks) {
+    for (Instruction &I : *BB) {
+      RemapInstruction(&I, VMap,
                        RF_NoModuleLevelChanges | RF_IgnoreMissingEntries);
     }
   }




More information about the llvm-commits mailing list