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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // +----> kSchedulable ----+--------> kScheduled | 42 // +----> kSchedulable ----+--------> kScheduled |
43 // | 43 // |
44 // 1) GetPlacement(): kUnknown -> kCoupled|kSchedulable|kFixed | 44 // 1) GetPlacement(): kUnknown -> kCoupled|kSchedulable|kFixed |
45 // 2) UpdatePlacement(): kCoupled|kSchedulable -> kFixed|kScheduled | 45 // 2) UpdatePlacement(): kCoupled|kSchedulable -> kFixed|kScheduled |
46 enum Placement { kUnknown, kSchedulable, kFixed, kCoupled, kScheduled }; | 46 enum Placement { kUnknown, kSchedulable, kFixed, kCoupled, kScheduled }; |
47 | 47 |
48 // Per-node data tracked during scheduling. | 48 // Per-node data tracked during scheduling. |
49 struct SchedulerData { | 49 struct SchedulerData { |
50 BasicBlock* minimum_block_; // Minimum legal RPO placement. | 50 BasicBlock* minimum_block_; // Minimum legal RPO placement. |
51 int unscheduled_count_; // Number of unscheduled uses of this node. | 51 int unscheduled_count_; // Number of unscheduled uses of this node. |
52 bool is_connected_control_; // {true} if control-connected to the end node. | |
53 Placement placement_; // Whether the node is fixed, schedulable, | 52 Placement placement_; // Whether the node is fixed, schedulable, |
54 // coupled to another node, or not yet known. | 53 // coupled to another node, or not yet known. |
55 }; | 54 }; |
56 | 55 |
57 Zone* zone_; | 56 Zone* zone_; |
58 Graph* graph_; | 57 Graph* graph_; |
59 Schedule* schedule_; | 58 Schedule* schedule_; |
60 NodeVectorVector scheduled_nodes_; // Per-block list of nodes in reverse. | 59 NodeVectorVector scheduled_nodes_; // Per-block list of nodes in reverse. |
61 NodeVector schedule_root_nodes_; // Fixed root nodes seed the worklist. | 60 NodeVector schedule_root_nodes_; // Fixed root nodes seed the worklist. |
62 ZoneQueue<Node*> schedule_queue_; // Worklist of schedulable nodes. | 61 ZoneQueue<Node*> schedule_queue_; // Worklist of schedulable nodes. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 105 |
107 void FuseFloatingControl(BasicBlock* block, Node* node); | 106 void FuseFloatingControl(BasicBlock* block, Node* node); |
108 void MovePlannedNodes(BasicBlock* from, BasicBlock* to); | 107 void MovePlannedNodes(BasicBlock* from, BasicBlock* to); |
109 }; | 108 }; |
110 | 109 |
111 } // namespace compiler | 110 } // namespace compiler |
112 } // namespace internal | 111 } // namespace internal |
113 } // namespace v8 | 112 } // namespace v8 |
114 | 113 |
115 #endif // V8_COMPILER_SCHEDULER_H_ | 114 #endif // V8_COMPILER_SCHEDULER_H_ |
OLD | NEW |