Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: src/IceRegAlloc.cpp

Issue 830303003: Subzero: Clean up a few areas. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rewrite another loop using reverse_range() Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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";
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698