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

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

Issue 727323002: [turbofan] move register allocation phases to pipeline (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« src/compiler/pipeline.cc ('K') | « test/cctest/compiler/test-codegen-deopt.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/register-allocator-unittest.cc
diff --git a/test/unittests/compiler/register-allocator-unittest.cc b/test/unittests/compiler/register-allocator-unittest.cc
index 6866389fef52cbceb28e359cbc8800d2507aea2d..546b2532bd61459205a8104a06d00fe8178e9d58 100644
--- a/test/unittests/compiler/register-allocator-unittest.cc
+++ b/test/unittests/compiler/register-allocator-unittest.cc
@@ -3,8 +3,8 @@
// found in the LICENSE file.
#include "src/base/utils/random-number-generator.h"
-#include "src/compiler/register-allocator.h"
-#include "src/compiler/register-allocator-verifier.h"
+#include "src/compiler/instruction.h"
+#include "src/compiler/pipeline.h"
#include "test/unittests/test-utils.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -167,14 +167,6 @@ class RegisterAllocatorTest : public TestWithZone {
return sequence_;
}
- RegisterAllocator* allocator() {
- if (allocator_.is_empty()) {
- allocator_.Reset(
- new RegisterAllocator(config(), zone(), frame(), sequence()));
- }
- return allocator_.get();
- }
-
void StartLoop(int loop_blocks) {
CHECK(current_block_ == nullptr);
if (!loop_blocks_.empty()) {
@@ -227,20 +219,7 @@ class RegisterAllocatorTest : public TestWithZone {
void Allocate() {
CHECK_EQ(nullptr, current_block_);
WireBlocks();
- RegisterAllocatorVerifier verifier(zone(), config(), sequence());
- if (FLAG_trace_alloc || FLAG_trace_turbo) {
- OFStream os(stdout);
- PrintableInstructionSequence printable = {config(), sequence()};
- os << "Before: " << std::endl << printable << std::endl;
- }
- allocator()->Allocate();
- if (FLAG_trace_alloc || FLAG_trace_turbo) {
- OFStream os(stdout);
- PrintableInstructionSequence printable = {config(), sequence()};
- os << "After: " << std::endl << printable << std::endl;
- }
- verifier.VerifyAssignment();
- verifier.VerifyGapMoves();
+ Pipeline::AllocateRegisters(config(), sequence(), true);
}
TestOperand Imm(int32_t imm = 0) {
@@ -520,7 +499,6 @@ class RegisterAllocatorTest : public TestWithZone {
SmartPointer<RegisterConfiguration> config_;
Frame* frame_;
- SmartPointer<RegisterAllocator> allocator_;
InstructionSequence* sequence_;
int num_general_registers_;
int num_double_registers_;
« src/compiler/pipeline.cc ('K') | « 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