Index: src/IceRegAlloc.cpp |
diff --git a/src/IceRegAlloc.cpp b/src/IceRegAlloc.cpp |
index d65b3b6737a7486088405772f9df81116dc02485..e7ba50ffbf73127c2de29b2a8d6bcfeb3546f8d3 100644 |
--- a/src/IceRegAlloc.cpp |
+++ b/src/IceRegAlloc.cpp |
@@ -494,9 +494,7 @@ void LinearScan::scan(const llvm::SmallBitVector &RegMaskFull, |
// complexity. |
llvm::SmallBitVector PrecoloredUnhandledMask(RegMask.size()); |
// Note: PrecoloredUnhandledMask is only used for dumping. |
- for (auto I = UnhandledPrecolored.rbegin(), E = UnhandledPrecolored.rend(); |
- I != E; ++I) { |
- Variable *Item = *I; |
+ for (Variable *Item : reverse_range(UnhandledPrecolored)) { |
assert(Item->hasReg()); |
if (Cur->rangeEndsBefore(Item)) |
break; |
@@ -731,8 +729,8 @@ void LinearScan::dump(Cfg *Func) const { |
Str << "\n"; |
} |
Str << "++++++ Unhandled:\n"; |
- for (auto I = Unhandled.rbegin(), E = Unhandled.rend(); I != E; ++I) { |
- dumpLiveRange(*I, Func); |
+ for (const Variable *Item : reverse_range(Unhandled)) { |
+ dumpLiveRange(Item, Func); |
Str << "\n"; |
} |
Str << "++++++ Active:\n"; |