Revision: 23949
Author:   [email protected]
Date:     Mon Sep 15 13:57:56 2014 UTC
Log: Fix schedule for interleaved floating control by wiring one floating control structure per block.

[email protected], [email protected]
BUG=

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

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

=======================================
--- /branches/bleeding_edge/src/compiler/scheduler.cc Mon Sep 1 09:31:14 2014 UTC +++ /branches/bleeding_edge/src/compiler/scheduler.cc Mon Sep 15 13:57:56 2014 UTC
@@ -638,13 +638,19 @@
   int max = static_cast<int>(schedule_->rpo_order()->size());
   for (int i = max - 1; i >= 0; i--) {
     BasicBlock* block = schedule_->rpo_order()->at(i);
+    // TODO(titzer): we place at most one floating control structure per
+    // basic block because scheduling currently can interleave phis from
+    // one subgraph with the merges from another subgraph.
+    bool one_placed = false;
     for (int j = static_cast<int>(block->nodes_.size()) - 1; j >= 0; j--) {
       Node* node = block->nodes_[j];
       SchedulerData* data = GetData(node);
-      if (data->is_floating_control_ && !data->is_connected_control_) {
+      if (data->is_floating_control_ && !data->is_connected_control_ &&
+          !one_placed) {
Trace(" Floating control #%d:%s was scheduled in B%d\n", node->id(),
               node->op()->mnemonic(), block->id());
         ConnectFloatingControlSubgraph(block, node);
+        one_placed = true;
       }
     }
   }

--
--
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