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 #include "src/compiler/scheduler.h" | 5 #include "src/compiler/scheduler.h" |
6 | 6 |
7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
8 #include "src/compiler/graph-inl.h" | 8 #include "src/compiler/graph-inl.h" |
9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
11 #include "src/compiler/node-properties-inl.h" | 11 #include "src/compiler/node-properties-inl.h" |
12 #include "src/data-flow.h" | 12 #include "src/data-flow.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 namespace compiler { | 16 namespace compiler { |
17 | 17 |
18 Scheduler::Scheduler(Zone* zone, Graph* graph, Schedule* schedule) | 18 Scheduler::Scheduler(Zone* zone, Graph* graph, Schedule* schedule) |
19 : zone_(zone), | 19 : zone_(zone), |
20 graph_(graph), | 20 graph_(graph), |
21 schedule_(schedule), | 21 schedule_(schedule), |
22 branches_(NodeVector::allocator_type(zone)), | 22 branches_(NodeVector::allocator_type(zone)), |
23 calls_(NodeVector::allocator_type(zone)), | 23 calls_(NodeVector::allocator_type(zone)), |
24 deopts_(NodeVector::allocator_type(zone)), | 24 deopts_(NodeVector::allocator_type(zone)), |
25 returns_(NodeVector::allocator_type(zone)), | 25 returns_(NodeVector::allocator_type(zone)), |
26 loops_and_merges_(NodeVector::allocator_type(zone)), | 26 loops_and_merges_(NodeVector::allocator_type(zone)), |
27 node_block_placement_(BasicBlockVector::allocator_type(zone)), | |
28 unscheduled_uses_(IntVector::allocator_type(zone)), | 27 unscheduled_uses_(IntVector::allocator_type(zone)), |
29 scheduled_nodes_(NodeVectorVector::allocator_type(zone)), | 28 scheduled_nodes_(NodeVectorVector::allocator_type(zone)), |
30 schedule_root_nodes_(NodeVector::allocator_type(zone)), | 29 schedule_root_nodes_(NodeVector::allocator_type(zone)), |
31 schedule_early_rpo_index_(IntVector::allocator_type(zone)) {} | 30 schedule_early_rpo_index_(IntVector::allocator_type(zone)) {} |
32 | 31 |
33 | 32 |
34 Schedule* Scheduler::ComputeSchedule(Graph* graph) { | 33 Schedule* Scheduler::ComputeSchedule(Graph* graph) { |
35 Zone tmp_zone(graph->zone()->isolate()); | 34 Zone tmp_zone(graph->zone()->isolate()); |
36 Schedule* schedule = new (graph->zone()) Schedule(graph->zone()); | 35 Schedule* schedule = new (graph->zone()) Schedule(graph->zone()); |
37 Scheduler scheduler(&tmp_zone, graph, schedule); | 36 Scheduler scheduler(&tmp_zone, graph, schedule); |
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 | 1040 |
1042 #if DEBUG | 1041 #if DEBUG |
1043 if (FLAG_trace_turbo_scheduler) PrintRPO(num_loops, loops, final_order); | 1042 if (FLAG_trace_turbo_scheduler) PrintRPO(num_loops, loops, final_order); |
1044 VerifySpecialRPO(num_loops, loops, final_order); | 1043 VerifySpecialRPO(num_loops, loops, final_order); |
1045 #endif | 1044 #endif |
1046 return final_order; | 1045 return final_order; |
1047 } | 1046 } |
1048 } | 1047 } |
1049 } | 1048 } |
1050 } // namespace v8::internal::compiler | 1049 } // namespace v8::internal::compiler |
OLD | NEW |