OLD | NEW |
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 13 matching lines...) Expand all Loading... |
24 static Schedule* ComputeSchedule(Graph* graph); | 24 static Schedule* ComputeSchedule(Graph* graph); |
25 | 25 |
26 // Compute the RPO of blocks in an existing schedule. | 26 // Compute the RPO of blocks in an existing schedule. |
27 static BasicBlockVector* ComputeSpecialRPO(Schedule* schedule); | 27 static BasicBlockVector* ComputeSpecialRPO(Schedule* schedule); |
28 | 28 |
29 private: | 29 private: |
30 enum Placement { kUnknown, kSchedulable, kFixed }; | 30 enum Placement { kUnknown, kSchedulable, kFixed }; |
31 | 31 |
32 // Per-node data tracked during scheduling. | 32 // Per-node data tracked during scheduling. |
33 struct SchedulerData { | 33 struct SchedulerData { |
| 34 BasicBlock* minimum_block_; // Minimum legal RPO placement. |
34 int unscheduled_count_; // Number of unscheduled uses of this node. | 35 int unscheduled_count_; // Number of unscheduled uses of this node. |
35 int minimum_rpo_; // Minimum legal RPO placement. | |
36 bool is_connected_control_; // {true} if control-connected to the end node. | 36 bool is_connected_control_; // {true} if control-connected to the end node. |
37 bool is_floating_control_; // {true} if control, but not control-connected | 37 bool is_floating_control_; // {true} if control, but not control-connected |
38 // to the end node. | 38 // to the end node. |
39 Placement placement_ : 3; // Whether the node is fixed, schedulable, | 39 Placement placement_ : 3; // Whether the node is fixed, schedulable, |
40 // or not yet known. | 40 // or not yet known. |
41 }; | 41 }; |
42 | 42 |
43 Zone* zone_; | 43 Zone* zone_; |
44 Graph* graph_; | 44 Graph* graph_; |
45 Schedule* schedule_; | 45 Schedule* schedule_; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 bool ConnectFloatingControl(); | 89 bool ConnectFloatingControl(); |
90 void ConnectFloatingControlSubgraph(BasicBlock* block, Node* node); | 90 void ConnectFloatingControlSubgraph(BasicBlock* block, Node* node); |
91 }; | 91 }; |
92 | 92 |
93 } // namespace compiler | 93 } // namespace compiler |
94 } // namespace internal | 94 } // namespace internal |
95 } // namespace v8 | 95 } // namespace v8 |
96 | 96 |
97 #endif // V8_COMPILER_SCHEDULER_H_ | 97 #endif // V8_COMPILER_SCHEDULER_H_ |
OLD | NEW |