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

Unified Diff: src/compiler/instruction-scheduler.cc

Issue 1738973002: [turbofan] More "auto" keyword cleanup (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/compiler/instruction.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-scheduler.cc
diff --git a/src/compiler/instruction-scheduler.cc b/src/compiler/instruction-scheduler.cc
index adbfd5d10d755e022e6fc76f79d1b80a9694e63f..fa29e7eced1e71e84381843cb5491d5d211894ed 100644
--- a/src/compiler/instruction-scheduler.cc
+++ b/src/compiler/instruction-scheduler.cc
@@ -115,7 +115,7 @@ void InstructionScheduler::AddInstruction(Instruction* instr) {
if (IsBlockTerminator(instr)) {
// Make sure that basic block terminators are not moved by adding them
// as successor of every instruction.
- for (auto node : graph_) {
+ for (ScheduleGraphNode* node : graph_) {
node->AddSuccessor(new_node);
}
} else if (IsFixedRegisterParameter(instr)) {
@@ -134,7 +134,7 @@ void InstructionScheduler::AddInstruction(Instruction* instr) {
if (last_side_effect_instr_ != nullptr) {
last_side_effect_instr_->AddSuccessor(new_node);
}
- for (auto load : pending_loads_) {
+ for (ScheduleGraphNode* load : pending_loads_) {
load->AddSuccessor(new_node);
}
pending_loads_.clear();
@@ -149,7 +149,7 @@ void InstructionScheduler::AddInstruction(Instruction* instr) {
}
// Look for operand dependencies.
- for (auto node : graph_) {
+ for (ScheduleGraphNode* node : graph_) {
if (HasOperandDependency(node->instruction(), instr)) {
node->AddSuccessor(new_node);
}
@@ -168,7 +168,7 @@ void InstructionScheduler::ScheduleBlock() {
ComputeTotalLatencies();
// Add nodes which don't have dependencies to the ready list.
- for (auto node : graph_) {
+ for (ScheduleGraphNode* node : graph_) {
if (!node->HasUnscheduledPredecessor()) {
ready_list.AddNode(node);
}
@@ -177,12 +177,12 @@ void InstructionScheduler::ScheduleBlock() {
// Go through the ready list and schedule the instructions.
int cycle = 0;
while (!ready_list.IsEmpty()) {
- auto candidate = ready_list.PopBestCandidate(cycle);
+ ScheduleGraphNode* candidate = ready_list.PopBestCandidate(cycle);
if (candidate != nullptr) {
sequence()->AddInstruction(candidate->instruction());
- for (auto successor : candidate->successors()) {
+ for (ScheduleGraphNode* successor : candidate->successors()) {
successor->DropUnscheduledPredecessor();
successor->set_start_cycle(
std::max(successor->start_cycle(),
@@ -296,10 +296,10 @@ bool InstructionScheduler::IsBlockTerminator(const Instruction* instr) const {
void InstructionScheduler::ComputeTotalLatencies() {
- for (auto node : base::Reversed(graph_)) {
+ for (ScheduleGraphNode* node : base::Reversed(graph_)) {
int max_latency = 0;
- for (auto successor : node->successors()) {
+ for (ScheduleGraphNode* successor : node->successors()) {
DCHECK(successor->total_latency() != -1);
if (successor->total_latency() > max_latency) {
max_latency = successor->total_latency();
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698