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

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

Issue 2276003002: [turbofan] Allow tests to enable/disable instruction scheduling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « src/compiler/instruction-selector.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/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
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
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
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698