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/node.h" |
10 #include "src/compiler/opcodes.h" | 11 #include "src/compiler/opcodes.h" |
11 #include "src/compiler/schedule.h" | 12 #include "src/compiler/schedule.h" |
12 #include "src/compiler/zone-pool.h" | 13 #include "src/compiler/zone-pool.h" |
13 #include "src/zone-containers.h" | 14 #include "src/zone-containers.h" |
14 | 15 |
15 namespace v8 { | 16 namespace v8 { |
16 namespace internal { | 17 namespace internal { |
17 namespace compiler { | 18 namespace compiler { |
18 | 19 |
| 20 // Forward declarations. |
19 class CFGBuilder; | 21 class CFGBuilder; |
20 class ControlEquivalence; | 22 class ControlEquivalence; |
| 23 class Graph; |
21 class SpecialRPONumberer; | 24 class SpecialRPONumberer; |
22 | 25 |
| 26 |
23 // Computes a schedule from a graph, placing nodes into basic blocks and | 27 // Computes a schedule from a graph, placing nodes into basic blocks and |
24 // ordering the basic blocks in the special RPO order. | 28 // ordering the basic blocks in the special RPO order. |
25 class Scheduler { | 29 class Scheduler { |
26 public: | 30 public: |
27 // The complete scheduling algorithm. Creates a new schedule and places all | 31 // The complete scheduling algorithm. Creates a new schedule and places all |
28 // nodes from the graph into it. | 32 // nodes from the graph into it. |
29 static Schedule* ComputeSchedule(Zone* zone, Graph* graph); | 33 static Schedule* ComputeSchedule(Zone* zone, Graph* graph); |
30 | 34 |
31 // Compute the RPO of blocks in an existing schedule. | 35 // Compute the RPO of blocks in an existing schedule. |
32 static BasicBlockVector* ComputeSpecialRPO(Zone* zone, Schedule* schedule); | 36 static BasicBlockVector* ComputeSpecialRPO(Zone* zone, Schedule* schedule); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 109 |
106 void FuseFloatingControl(BasicBlock* block, Node* node); | 110 void FuseFloatingControl(BasicBlock* block, Node* node); |
107 void MovePlannedNodes(BasicBlock* from, BasicBlock* to); | 111 void MovePlannedNodes(BasicBlock* from, BasicBlock* to); |
108 }; | 112 }; |
109 | 113 |
110 } // namespace compiler | 114 } // namespace compiler |
111 } // namespace internal | 115 } // namespace internal |
112 } // namespace v8 | 116 } // namespace v8 |
113 | 117 |
114 #endif // V8_COMPILER_SCHEDULER_H_ | 118 #endif // V8_COMPILER_SCHEDULER_H_ |
OLD | NEW |