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

Side by Side Diff: test/unittests/compiler/register-allocator-unittest.cc

Issue 727373002: [turbofan] add ForTesting to pipeline entry points that are for testing only. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 6 years, 1 month 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/compiler/test-codegen-deopt.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 "src/base/utils/random-number-generator.h" 5 #include "src/base/utils/random-number-generator.h"
6 #include "src/compiler/instruction.h" 6 #include "src/compiler/instruction.h"
7 #include "src/compiler/pipeline.h" 7 #include "src/compiler/pipeline.h"
8 #include "test/unittests/test-utils.h" 8 #include "test/unittests/test-utils.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 10
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 completions_.push_back(completion); 212 completions_.push_back(completion);
213 CHECK(current_block_ != nullptr); 213 CHECK(current_block_ != nullptr);
214 sequence()->EndBlock(current_block_->rpo_number()); 214 sequence()->EndBlock(current_block_->rpo_number());
215 current_block_ = nullptr; 215 current_block_ = nullptr;
216 return instruction_index; 216 return instruction_index;
217 } 217 }
218 218
219 void Allocate() { 219 void Allocate() {
220 CHECK_EQ(nullptr, current_block_); 220 CHECK_EQ(nullptr, current_block_);
221 WireBlocks(); 221 WireBlocks();
222 Pipeline::AllocateRegisters(config(), sequence(), true); 222 Pipeline::AllocateRegistersForTesting(config(), sequence(), true);
223 } 223 }
224 224
225 TestOperand Imm(int32_t imm = 0) { 225 TestOperand Imm(int32_t imm = 0) {
226 int index = sequence()->AddImmediate(Constant(imm)); 226 int index = sequence()->AddImmediate(Constant(imm));
227 return TestOperand(kImmediate, index); 227 return TestOperand(kImmediate, index);
228 } 228 }
229 229
230 VReg Parameter(TestOperand output_op = Reg()) { 230 VReg Parameter(TestOperand output_op = Reg()) {
231 VReg vreg = NewReg(); 231 VReg vreg = NewReg();
232 InstructionOperand* outputs[1]{ConvertOutputOp(vreg, output_op)}; 232 InstructionOperand* outputs[1]{ConvertOutputOp(vreg, output_op)};
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 StartBlock(); 724 StartBlock();
725 Return(DefineConstant()); 725 Return(DefineConstant());
726 EndBlock(); 726 EndBlock();
727 727
728 Allocate(); 728 Allocate();
729 } 729 }
730 730
731 } // namespace compiler 731 } // namespace compiler
732 } // namespace internal 732 } // namespace internal
733 } // namespace v8 733 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-codegen-deopt.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698