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

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

Issue 602083003: Fix scheduler to correctly schedule nested diamonds. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: titzer's comments Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compiler/scheduler.cc » ('j') | src/compiler/scheduler.cc » ('J')
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 #ifndef V8_COMPILER_SCHEDULER_H_ 5 #ifndef V8_COMPILER_SCHEDULER_H_
6 #define V8_COMPILER_SCHEDULER_H_ 6 #define V8_COMPILER_SCHEDULER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 22 matching lines...) Expand all
33 private: 33 private:
34 enum Placement { kUnknown, kSchedulable, kFixed }; 34 enum Placement { kUnknown, kSchedulable, kFixed };
35 35
36 // Per-node data tracked during scheduling. 36 // Per-node data tracked during scheduling.
37 struct SchedulerData { 37 struct SchedulerData {
38 int unscheduled_count_; // Number of unscheduled uses of this node. 38 int unscheduled_count_; // Number of unscheduled uses of this node.
39 int minimum_rpo_; // Minimum legal RPO placement. 39 int minimum_rpo_; // Minimum legal RPO placement.
40 bool is_connected_control_; // {true} if control-connected to the end node. 40 bool is_connected_control_; // {true} if control-connected to the end node.
41 bool is_floating_control_; // {true} if control, but not control-connected 41 bool is_floating_control_; // {true} if control, but not control-connected
42 // to the end node. 42 // to the end node.
43 Placement placement_ : 3; // Whether the node is fixed, schedulable, 43 Placement placement_; // Whether the node is fixed, schedulable,
44 // or not yet known. 44 // or not yet known.
45 NodeVector additional_dependencies;
45 }; 46 };
46 47
47 Zone* zone_; 48 Zone* zone_;
48 Graph* graph_; 49 Graph* graph_;
49 Schedule* schedule_; 50 Schedule* schedule_;
50 NodeVectorVector scheduled_nodes_; 51 NodeVectorVector scheduled_nodes_;
51 NodeVector schedule_root_nodes_; 52 NodeVector schedule_root_nodes_;
52 ZoneVector<SchedulerData> node_data_; 53 ZoneVector<SchedulerData> node_data_;
53 bool has_floating_control_; 54 bool has_floating_control_;
54 55
55 Scheduler(Zone* zone, Graph* graph, Schedule* schedule); 56 Scheduler(Zone* zone, Graph* graph, Schedule* schedule);
56 57
57 SchedulerData DefaultSchedulerData(); 58 SchedulerData DefaultSchedulerData(Zone* zone);
58 59
59 SchedulerData* GetData(Node* node) { 60 SchedulerData* GetData(Node* node) {
60 DCHECK(node->id() < static_cast<int>(node_data_.size())); 61 DCHECK(node->id() < static_cast<int>(node_data_.size()));
61 return &node_data_[node->id()]; 62 return &node_data_[node->id()];
62 } 63 }
63 64
64 void BuildCFG(); 65 void BuildCFG();
65 66
66 Placement GetPlacement(Node* node); 67 Placement GetPlacement(Node* node);
67 68
(...skipping 20 matching lines...) Expand all
88 89
89 bool ConnectFloatingControl(); 90 bool ConnectFloatingControl();
90 91
91 void ConnectFloatingControlSubgraph(BasicBlock* block, Node* node); 92 void ConnectFloatingControlSubgraph(BasicBlock* block, Node* node);
92 }; 93 };
93 } 94 }
94 } 95 }
95 } // namespace v8::internal::compiler 96 } // namespace v8::internal::compiler
96 97
97 #endif // V8_COMPILER_SCHEDULER_H_ 98 #endif // V8_COMPILER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/scheduler.cc » ('j') | src/compiler/scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698