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

Side by Side Diff: src/compiler/scheduler.cc

Issue 809333002: [turbofan] Implement OSR for outer loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <deque> 5 #include <deque>
6 #include <queue> 6 #include <queue>
7 7
8 #include "src/compiler/scheduler.h" 8 #include "src/compiler/scheduler.h"
9 9
10 #include "src/bit-vector.h" 10 #include "src/bit-vector.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 DCHECK(node->id() < static_cast<int>(node_data_.size())); 68 DCHECK(node->id() < static_cast<int>(node_data_.size()));
69 return &node_data_[node->id()]; 69 return &node_data_[node->id()];
70 } 70 }
71 71
72 72
73 Scheduler::Placement Scheduler::GetPlacement(Node* node) { 73 Scheduler::Placement Scheduler::GetPlacement(Node* node) {
74 SchedulerData* data = GetData(node); 74 SchedulerData* data = GetData(node);
75 if (data->placement_ == kUnknown) { // Compute placement, once, on demand. 75 if (data->placement_ == kUnknown) { // Compute placement, once, on demand.
76 switch (node->opcode()) { 76 switch (node->opcode()) {
77 case IrOpcode::kParameter: 77 case IrOpcode::kParameter:
78 // Parameters are always fixed to the start node. 78 case IrOpcode::kOsrValue:
79 // Parameters and OSR values are always fixed to the start block.
79 data->placement_ = kFixed; 80 data->placement_ = kFixed;
80 break; 81 break;
81 case IrOpcode::kPhi: 82 case IrOpcode::kPhi:
82 case IrOpcode::kEffectPhi: { 83 case IrOpcode::kEffectPhi: {
83 // Phis and effect phis are fixed if their control inputs are, whereas 84 // Phis and effect phis are fixed if their control inputs are, whereas
84 // otherwise they are coupled to a floating control node. 85 // otherwise they are coupled to a floating control node.
85 Placement p = GetPlacement(NodeProperties::GetControlInput(node)); 86 Placement p = GetPlacement(NodeProperties::GetControlInput(node));
86 data->placement_ = (p == kFixed ? kFixed : kCoupled); 87 data->placement_ = (p == kFixed ? kFixed : kCoupled);
87 break; 88 break;
88 } 89 }
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 for (NodeVectorIter i = nodes->begin(); i != nodes->end(); ++i) { 1475 for (NodeVectorIter i = nodes->begin(); i != nodes->end(); ++i) {
1475 schedule_->SetBlockForNode(to, *i); 1476 schedule_->SetBlockForNode(to, *i);
1476 scheduled_nodes_[to->id().ToSize()].push_back(*i); 1477 scheduled_nodes_[to->id().ToSize()].push_back(*i);
1477 } 1478 }
1478 nodes->clear(); 1479 nodes->clear();
1479 } 1480 }
1480 1481
1481 } // namespace compiler 1482 } // namespace compiler
1482 } // namespace internal 1483 } // namespace internal
1483 } // namespace v8 1484 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698