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

Side by Side Diff: test/cctest/compiler/test-instruction.cc

Issue 696363002: Make special RPO computation iterative during scheduling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed my own nits. 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 | Annotate | Revision Log
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/v8.h" 5 #include "src/v8.h"
6 #include "test/cctest/cctest.h" 6 #include "test/cctest/cctest.h"
7 7
8 #include "src/compiler/code-generator.h" 8 #include "src/compiler/code-generator.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 BasicBlockVector* blocks = R.schedule.rpo_order(); 131 BasicBlockVector* blocks = R.schedule.rpo_order();
132 CHECK_EQ(static_cast<int>(blocks->size()), R.code->InstructionBlockCount()); 132 CHECK_EQ(static_cast<int>(blocks->size()), R.code->InstructionBlockCount());
133 133
134 int index = 0; 134 int index = 0;
135 for (BasicBlockVectorIter i = blocks->begin(); i != blocks->end(); 135 for (BasicBlockVectorIter i = blocks->begin(); i != blocks->end();
136 i++, index++) { 136 i++, index++) {
137 BasicBlock* block = *i; 137 BasicBlock* block = *i;
138 CHECK_EQ(block->rpo_number(), R.BlockAt(block)->rpo_number().ToInt()); 138 CHECK_EQ(block->rpo_number(), R.BlockAt(block)->rpo_number().ToInt());
139 CHECK_EQ(block->id().ToInt(), R.BlockAt(block)->id().ToInt()); 139 CHECK_EQ(block->id().ToInt(), R.BlockAt(block)->id().ToInt());
140 CHECK_EQ(-1, block->loop_end()); 140 CHECK_EQ(NULL, block->loop_end());
141 } 141 }
142 } 142 }
143 143
144 144
145 TEST(InstructionGetBasicBlock) { 145 TEST(InstructionGetBasicBlock) {
146 InstructionTester R; 146 InstructionTester R;
147 147
148 BasicBlock* b0 = R.schedule.start(); 148 BasicBlock* b0 = R.schedule.start();
149 BasicBlock* b1 = R.schedule.NewBasicBlock(); 149 BasicBlock* b1 = R.schedule.NewBasicBlock();
150 BasicBlock* b2 = R.schedule.NewBasicBlock(); 150 BasicBlock* b2 = R.schedule.NewBasicBlock();
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 CHECK_EQ(inputs[z], m->InputAt(z)); 356 CHECK_EQ(inputs[z], m->InputAt(z));
357 } 357 }
358 358
359 for (size_t z = 0; z < k; z++) { 359 for (size_t z = 0; z < k; z++) {
360 CHECK_EQ(temps[z], m->TempAt(z)); 360 CHECK_EQ(temps[z], m->TempAt(z));
361 } 361 }
362 } 362 }
363 } 363 }
364 } 364 }
365 } 365 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698