| 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 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 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, |
| 44 source_position_mode, features); | 44 source_position_mode, features); |
| 45 selector.SelectInstructions(); | 45 selector.SelectInstructions(); |
| 46 if (FLAG_trace_turbo) { | 46 if (FLAG_trace_turbo) { |
| 47 OFStream out(stdout); | 47 OFStream out(stdout); |
| 48 PrintableInstructionSequence printable = { | 48 PrintableInstructionSequence printable = { |
| 49 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN), | 49 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN), |
| 50 &sequence}; | 50 &sequence}; |
| 51 out << "=== Code sequence after instruction selection ===" << std::endl | 51 out << "=== Code sequence after instruction selection ===" << std::endl |
| 52 << printable; | 52 << printable; |
| 53 } | 53 } |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); | 623 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); |
| 624 // Continuation. | 624 // Continuation. |
| 625 | 625 |
| 626 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); | 626 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); |
| 627 EXPECT_EQ(index, s.size()); | 627 EXPECT_EQ(index, s.size()); |
| 628 } | 628 } |
| 629 | 629 |
| 630 } // namespace compiler | 630 } // namespace compiler |
| 631 } // namespace internal | 631 } // namespace internal |
| 632 } // namespace v8 | 632 } // namespace v8 |
| OLD | NEW |