OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
6 #include "src/compiler/scheduler.h" | 6 #include "src/compiler/scheduler.h" |
7 #include "src/compiler/structured-machine-assembler.h" | 7 #include "src/compiler/structured-machine-assembler.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 23 matching lines...) Expand all Loading... |
34 parameters_ = zone()->NewArray<Node*>(parameter_count()); | 34 parameters_ = zone()->NewArray<Node*>(parameter_count()); |
35 for (int i = 0; i < parameter_count(); ++i) { | 35 for (int i = 0; i < parameter_count(); ++i) { |
36 parameters_[i] = NewNode(common()->Parameter(i), graph->start()); | 36 parameters_[i] = NewNode(common()->Parameter(i), graph->start()); |
37 } | 37 } |
38 } | 38 } |
39 | 39 |
40 | 40 |
41 Schedule* StructuredMachineAssembler::Export() { | 41 Schedule* StructuredMachineAssembler::Export() { |
42 // Compute the correct codegen order. | 42 // Compute the correct codegen order. |
43 DCHECK(schedule_->rpo_order()->empty()); | 43 DCHECK(schedule_->rpo_order()->empty()); |
44 Scheduler scheduler(zone(), graph(), schedule_); | 44 Scheduler::ComputeSpecialRPO(schedule_); |
45 scheduler.ComputeSpecialRPO(); | |
46 // Invalidate MachineAssembler. | 45 // Invalidate MachineAssembler. |
47 Schedule* schedule = schedule_; | 46 Schedule* schedule = schedule_; |
48 schedule_ = NULL; | 47 schedule_ = NULL; |
49 return schedule; | 48 return schedule; |
50 } | 49 } |
51 | 50 |
52 | 51 |
53 Node* StructuredMachineAssembler::Parameter(int index) { | 52 Node* StructuredMachineAssembler::Parameter(int index) { |
54 DCHECK(0 <= index && index < parameter_count()); | 53 DCHECK(0 <= index && index < parameter_count()); |
55 return parameters_[index]; | 54 return parameters_[index]; |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 } | 655 } |
657 pending_header_merges_.clear(); | 656 pending_header_merges_.clear(); |
658 pending_exit_merges_.clear(); | 657 pending_exit_merges_.clear(); |
659 header_environment_ = NULL; | 658 header_environment_ = NULL; |
660 DCHECK(IsDone()); | 659 DCHECK(IsDone()); |
661 } | 660 } |
662 | 661 |
663 } // namespace compiler | 662 } // namespace compiler |
664 } // namespace internal | 663 } // namespace internal |
665 } // namespace v8 | 664 } // namespace v8 |
OLD | NEW |