| 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/v8.h" | 5 #include "src/v8.h" |
| 6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
| 7 | 7 |
| 8 #include "src/compiler/code-generator.h" | 8 #include "src/compiler/code-generator.h" |
| 9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 Linkage linkage; | 44 Linkage linkage; |
| 45 CommonOperatorBuilder common; | 45 CommonOperatorBuilder common; |
| 46 MachineOperatorBuilder machine; | 46 MachineOperatorBuilder machine; |
| 47 TestInstrSeq* code; | 47 TestInstrSeq* code; |
| 48 | 48 |
| 49 Zone* zone() { return main_zone(); } | 49 Zone* zone() { return main_zone(); } |
| 50 | 50 |
| 51 void allocCode() { | 51 void allocCode() { |
| 52 if (schedule.rpo_order()->size() == 0) { | 52 if (schedule.rpo_order()->size() == 0) { |
| 53 // Compute the RPO order. | 53 // Compute the RPO order. |
| 54 Scheduler scheduler(zone(), &graph, &schedule); | 54 Scheduler::ComputeSpecialRPO(&schedule); |
| 55 scheduler.ComputeSpecialRPO(); | |
| 56 DCHECK(schedule.rpo_order()->size() > 0); | 55 DCHECK(schedule.rpo_order()->size() > 0); |
| 57 } | 56 } |
| 58 code = new TestInstrSeq(&linkage, &graph, &schedule); | 57 code = new TestInstrSeq(&linkage, &graph, &schedule); |
| 59 } | 58 } |
| 60 | 59 |
| 61 Node* Int32Constant(int32_t val) { | 60 Node* Int32Constant(int32_t val) { |
| 62 Node* node = graph.NewNode(common.Int32Constant(val)); | 61 Node* node = graph.NewNode(common.Int32Constant(val)); |
| 63 schedule.AddNode(schedule.entry(), node); | 62 schedule.AddNode(schedule.entry(), node); |
| 64 return node; | 63 return node; |
| 65 } | 64 } |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 CHECK_EQ(inputs[z], m->InputAt(z)); | 341 CHECK_EQ(inputs[z], m->InputAt(z)); |
| 343 } | 342 } |
| 344 | 343 |
| 345 for (size_t z = 0; z < k; z++) { | 344 for (size_t z = 0; z < k; z++) { |
| 346 CHECK_EQ(temps[z], m->TempAt(z)); | 345 CHECK_EQ(temps[z], m->TempAt(z)); |
| 347 } | 346 } |
| 348 } | 347 } |
| 349 } | 348 } |
| 350 } | 349 } |
| 351 } | 350 } |
| OLD | NEW |