Revision: 25165
Author:   [email protected]
Date:     Wed Nov  5 15:45:17 2014 UTC
Log:      Fix printing and verification of RPO computation.

[email protected]

Review URL: https://codereview.chromium.org/700153002
https://code.google.com/p/v8/source/detail?r=25165

Modified:
 /branches/bleeding_edge/src/compiler/scheduler.cc

=======================================
--- /branches/bleeding_edge/src/compiler/scheduler.cc Wed Nov 5 10:43:42 2014 UTC +++ /branches/bleeding_edge/src/compiler/scheduler.cc Wed Nov 5 15:45:17 2014 UTC
@@ -922,9 +922,9 @@
// 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" : " ");
       }
@@ -982,23 +982,18 @@
       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.

Reply via email to