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

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

Issue 1405673003: provides a mechanism for optimizing compilers to select the different Register configuration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add the TODO comments. Created 5 years, 2 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-x64.cc ('k') | no next file » | 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/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/schedule.h" 8 #include "src/compiler/schedule.h"
9 #include "src/flags.h" 9 #include "src/flags.h"
10 #include "test/unittests/compiler/compiler-test-utils.h" 10 #include "test/unittests/compiler/compiler-test-utils.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 InstructionSequence sequence(test_->isolate(), test_->zone(), 44 InstructionSequence sequence(test_->isolate(), test_->zone(),
45 instruction_blocks); 45 instruction_blocks);
46 SourcePositionTable source_position_table(graph()); 46 SourcePositionTable source_position_table(graph());
47 InstructionSelector selector(test_->zone(), node_count, &linkage, &sequence, 47 InstructionSelector selector(test_->zone(), node_count, &linkage, &sequence,
48 schedule, &source_position_table, 48 schedule, &source_position_table,
49 source_position_mode, features); 49 source_position_mode, features);
50 selector.SelectInstructions(); 50 selector.SelectInstructions();
51 if (FLAG_trace_turbo) { 51 if (FLAG_trace_turbo) {
52 OFStream out(stdout); 52 OFStream out(stdout);
53 PrintableInstructionSequence printable = { 53 PrintableInstructionSequence printable = {
54 RegisterConfiguration::ArchDefault(), &sequence}; 54 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN),
55 &sequence};
55 out << "=== Code sequence after instruction selection ===" << std::endl 56 out << "=== Code sequence after instruction selection ===" << std::endl
56 << printable; 57 << printable;
57 } 58 }
58 Stream s; 59 Stream s;
59 s.virtual_registers_ = selector.GetVirtualRegistersForTesting(); 60 s.virtual_registers_ = selector.GetVirtualRegistersForTesting();
60 // Map virtual registers. 61 // Map virtual registers.
61 for (Instruction* const instr : sequence) { 62 for (Instruction* const instr : sequence) {
62 if (instr->opcode() < 0) continue; 63 if (instr->opcode() < 0) continue;
63 if (mode == kTargetInstructions) { 64 if (mode == kTargetInstructions) {
64 switch (instr->arch_opcode()) { 65 switch (instr->arch_opcode()) {
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); 613 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14)));
613 // Continuation. 614 // Continuation.
614 615
615 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); 616 EXPECT_EQ(kArchRet, s[index++]->arch_opcode());
616 EXPECT_EQ(index, s.size()); 617 EXPECT_EQ(index, s.size());
617 } 618 }
618 619
619 } // namespace compiler 620 } // namespace compiler
620 } // namespace internal 621 } // namespace internal
621 } // namespace v8 622 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/test-code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698