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

Unified Diff: src/compiler/scheduler.cc

Issue 700153002: Fix printing and verification of RPO computation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/scheduler.cc
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc
index c43ed812f9c5cb4f02cef9502102aa2a2399ed51..fee1dde24d8ca051468cd9e1e7ca7e41e7be0448 100644
--- a/src/compiler/scheduler.cc
+++ b/src/compiler/scheduler.cc
@@ -924,9 +924,9 @@ class SpecialRPONumberer : public ZoneObject {
// TODO(jarin,svenpanne): Add formatting here once we have support for
// that in streams (we want an equivalent of PrintF("%5d:", x) here).
os << " " << block->rpo_number() << ":";
- for (size_t j = 0; j < loops_.size(); j++) {
- bool membership = loops_[j].members->Contains(bid.ToInt());
- bool range = loops_[j].header->LoopContains(block);
+ for (size_t i = 0; i < loops_.size(); i++) {
+ bool range = loops_[i].header->LoopContains(block);
+ bool membership = loops_[i].header != block && range;
os << (membership ? " |" : " ");
os << (range ? "x" : " ");
}
@@ -984,23 +984,18 @@ class SpecialRPONumberer : public ZoneObject {
DCHECK(end_found);
// Check the contiguousness of loops.
- // TODO(mstarzinger): Loop membership bit-vector becomes stale.
- /*int count = 0;
+ int count = 0;
for (int j = 0; j < static_cast<int>(order->size()); j++) {
BasicBlock* block = order->at(j);
DCHECK(block->rpo_number() == j);
if (j < header->rpo_number() || j >= end->rpo_number()) {
- DCHECK(!loop->members->Contains(block->id().ToInt()));
+ DCHECK(!header->LoopContains(block));
} else {
- if (block == header) {
- DCHECK(!loop->members->Contains(block->id().ToInt()));
- } else {
- DCHECK(loop->members->Contains(block->id().ToInt()));
- }
+ DCHECK(header->LoopContains(block));
count++;
}
}
- DCHECK(links == count);*/
+ DCHECK(links == count);
}
}
#endif // DEBUG
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698