@@ -1292,16 +1292,16 @@ bool MemoryDependenceResults::getNonLocalPointerDepFromBB(
1292
1292
if (InsertRes.first ->second != Pointer.getAddr ()) {
1293
1293
// Make sure to clean up the Visited map before continuing on to
1294
1294
// PredTranslationFailure.
1295
- for (unsigned i = 0 ; i < NewBlocks. size (); i++ )
1296
- Visited.erase (NewBlocks[i] );
1295
+ for (auto *NewBlock : NewBlocks)
1296
+ Visited.erase (NewBlock );
1297
1297
goto PredTranslationFailure;
1298
1298
}
1299
1299
}
1300
1300
if (NewBlocks.size () > WorklistEntries) {
1301
1301
// Make sure to clean up the Visited map before continuing on to
1302
1302
// PredTranslationFailure.
1303
- for (unsigned i = 0 ; i < NewBlocks. size (); i++ )
1304
- Visited.erase (NewBlocks[i] );
1303
+ for (auto *NewBlock : NewBlocks)
1304
+ Visited.erase (NewBlock );
1305
1305
GotWorklistLimit = true ;
1306
1306
goto PredTranslationFailure;
1307
1307
}
@@ -1359,8 +1359,8 @@ bool MemoryDependenceResults::getNonLocalPointerDepFromBB(
1359
1359
1360
1360
// Make sure to clean up the Visited map before continuing on to
1361
1361
// PredTranslationFailure.
1362
- for (unsigned i = 0 , n = PredList. size (); i < n; ++i )
1363
- Visited.erase (PredList[i] .first );
1362
+ for (const auto &Pred : PredList)
1363
+ Visited.erase (Pred .first );
1364
1364
1365
1365
goto PredTranslationFailure;
1366
1366
}
@@ -1371,9 +1371,9 @@ bool MemoryDependenceResults::getNonLocalPointerDepFromBB(
1371
1371
// any results for. (getNonLocalPointerDepFromBB will modify our
1372
1372
// datastructures in ways the code after the PredTranslationFailure label
1373
1373
// doesn't expect.)
1374
- for (unsigned i = 0 , n = PredList. size (); i < n; ++i ) {
1375
- BasicBlock *Pred = PredList[i] .first ;
1376
- PHITransAddr &PredPointer = PredList[i] .second ;
1374
+ for (auto &I : PredList) {
1375
+ BasicBlock *Pred = I .first ;
1376
+ PHITransAddr &PredPointer = I .second ;
1377
1377
Value *PredPtrVal = PredPointer.getAddr ();
1378
1378
1379
1379
bool CanTranslate = true ;
0 commit comments