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 "test/unittests/compiler/instruction-selector-unittest.h" | 5 #include "test/unittests/compiler/instruction-selector-unittest.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
9 #include "src/compiler/schedule.h" | 9 #include "src/compiler/schedule.h" |
10 #include "src/flags.h" | 10 #include "src/flags.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 size_t const node_count = graph()->NodeCount(); | 34 size_t const node_count = graph()->NodeCount(); |
35 EXPECT_NE(0u, node_count); | 35 EXPECT_NE(0u, node_count); |
36 Linkage linkage(call_descriptor()); | 36 Linkage linkage(call_descriptor()); |
37 InstructionBlocks* instruction_blocks = | 37 InstructionBlocks* instruction_blocks = |
38 InstructionSequence::InstructionBlocksFor(test_->zone(), schedule); | 38 InstructionSequence::InstructionBlocksFor(test_->zone(), schedule); |
39 InstructionSequence sequence(test_->isolate(), test_->zone(), | 39 InstructionSequence sequence(test_->isolate(), test_->zone(), |
40 instruction_blocks); | 40 instruction_blocks); |
41 SourcePositionTable source_position_table(graph()); | 41 SourcePositionTable source_position_table(graph()); |
42 InstructionSelector selector(test_->zone(), node_count, &linkage, &sequence, | 42 InstructionSelector selector(test_->zone(), node_count, &linkage, &sequence, |
43 schedule, &source_position_table, nullptr, | 43 schedule, &source_position_table, nullptr, |
44 source_position_mode, features); | 44 source_position_mode, features, |
| 45 InstructionSelector::kDisableScheduling); |
45 selector.SelectInstructions(); | 46 selector.SelectInstructions(); |
46 if (FLAG_trace_turbo) { | 47 if (FLAG_trace_turbo) { |
47 OFStream out(stdout); | 48 OFStream out(stdout); |
48 PrintableInstructionSequence printable = {RegisterConfiguration::Turbofan(), | 49 PrintableInstructionSequence printable = {RegisterConfiguration::Turbofan(), |
49 &sequence}; | 50 &sequence}; |
50 out << "=== Code sequence after instruction selection ===" << std::endl | 51 out << "=== Code sequence after instruction selection ===" << std::endl |
51 << printable; | 52 << printable; |
52 } | 53 } |
53 Stream s; | 54 Stream s; |
54 s.virtual_registers_ = selector.GetVirtualRegistersForTesting(); | 55 s.virtual_registers_ = selector.GetVirtualRegistersForTesting(); |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); | 622 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); |
622 // Continuation. | 623 // Continuation. |
623 | 624 |
624 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); | 625 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); |
625 EXPECT_EQ(index, s.size()); | 626 EXPECT_EQ(index, s.size()); |
626 } | 627 } |
627 | 628 |
628 } // namespace compiler | 629 } // namespace compiler |
629 } // namespace internal | 630 } // namespace internal |
630 } // namespace v8 | 631 } // namespace v8 |
OLD | NEW |