Index: src/compiler/scheduler.cc |
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc |
index 1185cacab7b95cca5a01687021ce78b7c03f6a2f..9851dba4fec00eec5688557c86aac96bea752798 100644 |
--- a/src/compiler/scheduler.cc |
+++ b/src/compiler/scheduler.cc |
@@ -6,6 +6,7 @@ |
#include <iomanip> |
+#include "src/base/adapters.h" |
#include "src/bit-vector.h" |
#include "src/compiler/common-operator.h" |
#include "src/compiler/control-equivalence.h" |
@@ -1622,8 +1623,8 @@ void Scheduler::SealFinalSchedule() { |
for (NodeVector& nodes : scheduled_nodes_) { |
BasicBlock::Id id = BasicBlock::Id::FromInt(block_num++); |
BasicBlock* block = schedule_->GetBlockById(id); |
- for (auto i = nodes.rbegin(); i != nodes.rend(); ++i) { |
- schedule_->AddNode(block, *i); |
+ for (Node* node : base::Reversed(nodes)) { |
+ schedule_->AddNode(block, node); |
} |
} |
} |