Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: test/unittests/compiler/instruction-selector-unittest.cc

Issue 2092413002: [RegisterConfiguration] Streamline access to arch defaults, simplify Registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/test-code-stubs-x87.cc ('k') | test/unittests/compiler/move-optimizer-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
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 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 = {RegisterConfiguration::Turbofan(),
49 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN), 49 &sequence};
50 &sequence};
51 out << "=== Code sequence after instruction selection ===" << std::endl 50 out << "=== Code sequence after instruction selection ===" << std::endl
52 << printable; 51 << printable;
53 } 52 }
54 Stream s; 53 Stream s;
55 s.virtual_registers_ = selector.GetVirtualRegistersForTesting(); 54 s.virtual_registers_ = selector.GetVirtualRegistersForTesting();
56 // Map virtual registers. 55 // Map virtual registers.
57 for (Instruction* const instr : sequence) { 56 for (Instruction* const instr : sequence) {
58 if (instr->opcode() < 0) continue; 57 if (instr->opcode() < 0) continue;
59 if (mode == kTargetInstructions) { 58 if (mode == kTargetInstructions) {
60 switch (instr->arch_opcode()) { 59 switch (instr->arch_opcode()) {
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); 621 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14)));
623 // Continuation. 622 // Continuation.
624 623
625 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); 624 EXPECT_EQ(kArchRet, s[index++]->arch_opcode());
626 EXPECT_EQ(index, s.size()); 625 EXPECT_EQ(index, s.size());
627 } 626 }
628 627
629 } // namespace compiler 628 } // namespace compiler
630 } // namespace internal 629 } // namespace internal
631 } // namespace v8 630 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/test-code-stubs-x87.cc ('k') | test/unittests/compiler/move-optimizer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698