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

Unified Diff: test/cctest/compiler/test-scheduler.cc

Issue 696363002: Make special RPO computation iterative during scheduling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. 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
« no previous file with comments | « test/cctest/compiler/test-instruction.cc ('k') | test/unittests/compiler/register-allocator-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-scheduler.cc
diff --git a/test/cctest/compiler/test-scheduler.cc b/test/cctest/compiler/test-scheduler.cc
index 0ade4d15ed1a6aa31083009d42676865ba280616..3a0103d8ac7749fe70e9364fb402e627007c859d 100644
--- a/test/cctest/compiler/test-scheduler.cc
+++ b/test/cctest/compiler/test-scheduler.cc
@@ -30,7 +30,7 @@ static void CheckRPONumbers(BasicBlockVector* order, size_t expected,
for (int i = 0; i < static_cast<int>(order->size()); i++) {
CHECK(order->at(i)->rpo_number() == i);
if (!loops_allowed) {
- CHECK_LT(order->at(i)->loop_end(), 0);
+ CHECK_EQ(NULL, order->at(i)->loop_end());
CHECK_EQ(NULL, order->at(i)->loop_header());
}
}
@@ -40,19 +40,21 @@ static void CheckRPONumbers(BasicBlockVector* order, size_t expected,
static void CheckLoop(BasicBlockVector* order, BasicBlock** blocks,
int body_size) {
BasicBlock* header = blocks[0];
- CHECK_GT(header->loop_end(), 0);
- CHECK_EQ(body_size, (header->loop_end() - header->rpo_number()));
+ BasicBlock* end = header->loop_end();
+ CHECK_NE(NULL, end);
+ CHECK_GT(end->rpo_number(), 0);
+ CHECK_EQ(body_size, end->rpo_number() - header->rpo_number());
for (int i = 0; i < body_size; i++) {
- int num = blocks[i]->rpo_number();
- CHECK(num >= header->rpo_number() && num < header->loop_end());
+ CHECK_GE(blocks[i]->rpo_number(), header->rpo_number());
+ CHECK_LT(blocks[i]->rpo_number(), end->rpo_number());
CHECK(header->LoopContains(blocks[i]));
CHECK(header->IsLoopHeader() || blocks[i]->loop_header() == header);
}
if (header->rpo_number() > 0) {
CHECK_NE(order->at(header->rpo_number() - 1)->loop_header(), header);
}
- if (header->loop_end() < static_cast<int>(order->size())) {
- CHECK_NE(order->at(header->loop_end())->loop_header(), header);
+ if (end->rpo_number() < static_cast<int>(order->size())) {
+ CHECK_NE(order->at(end->rpo_number())->loop_header(), header);
}
}
« no previous file with comments | « test/cctest/compiler/test-instruction.cc ('k') | test/unittests/compiler/register-allocator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698