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

Unified Diff: src/compiler/scheduler.cc

Issue 564403003: Fix schedule for interleaved floating control by wiring one floating control structure per block. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months 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 cc3eae1b337fc914107453cd93ce9ce5847a5db5..402995006b410b9f2fc45df9b53f36b00f677acc 100644
--- a/src/compiler/scheduler.cc
+++ b/src/compiler/scheduler.cc
@@ -638,13 +638,19 @@ bool Scheduler::ConnectFloatingControl() {
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;
}
}
}
« 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