Reviewers: jarin,
Description:
Fix printing and verification of RPO computation.
[email protected]
Please review this at https://codereview.chromium.org/700153002/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+7, -12 lines):
M src/compiler/scheduler.cc
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
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.