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

Unified Diff: src/compiler/scheduler.cc

Issue 667953002: Fix scheduler not to connect final merge block in the graph to its inputs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 16773c5cba00b290045ea02a5a14d8750c77bbe7..42ee0c4fb44ea8eb4f240877533197136e09b9ca 100644
--- a/src/compiler/scheduler.cc
+++ b/src/compiler/scheduler.cc
@@ -283,6 +283,9 @@ class CFGBuilder {
}
void ConnectMerge(Node* merge) {
+ // Don't connect the special merge at the end to its predecessors.
+ if (IsFinalMerge(merge)) return;
+
BasicBlock* block = schedule_->block(merge);
DCHECK(block != NULL);
// For all of the merge's control inputs, add a goto at the end to the
@@ -290,10 +293,8 @@ class CFGBuilder {
for (InputIter j = merge->inputs().begin(); j != merge->inputs().end();
++j) {
BasicBlock* predecessor_block = schedule_->block(*j);
- if ((*j)->opcode() != IrOpcode::kReturn) {
- TraceConnect(merge, predecessor_block, block);
- schedule_->AddGoto(predecessor_block, block);
- }
+ TraceConnect(merge, predecessor_block, block);
+ schedule_->AddGoto(predecessor_block, block);
}
}
@@ -314,6 +315,10 @@ class CFGBuilder {
block->id().ToInt(), succ->id().ToInt());
}
}
+
+ bool IsFinalMerge(Node* node) {
+ return (node == scheduler_->graph_->end()->InputAt(0));
+ }
};
« 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