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

Unified Diff: src/compiler/scheduler.cc

Issue 602083003: Fix scheduler to correctly schedule nested diamonds. (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 | src/compiler/verifier.cc » ('j') | src/compiler/verifier.cc » ('J')
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 58878a0776bfeb483cb68811df0066db32bbf586..a72f91690fa88aec2264087c3acec95c41d28482 100644
--- a/src/compiler/scheduler.cc
+++ b/src/compiler/scheduler.cc
@@ -645,13 +645,18 @@ bool Scheduler::ConnectFloatingControl() {
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_ &&
- !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;
+ if (!one_placed && (NodeProperties::IsControl(node) ||
+ OperatorProperties::HasControlInput(node->op()))) {
+ Node* ctl = NodeProperties::IsControl(node)
+ ? node
+ : NodeProperties::GetControlInput(node);
+ SchedulerData* data = GetData(ctl);
+ if (data->is_floating_control_ && !data->is_connected_control_) {
+ Trace(" Floating control #%d:%s was scheduled in B%d\n", ctl->id(),
+ ctl->op()->mnemonic(), block->id());
+ ConnectFloatingControlSubgraph(block, ctl);
+ one_placed = true;
titzer 2014/09/25 12:19:24 So this basically matches the first node that is e
sigurds 2014/09/26 11:35:24 This is a valid point, I added a unit test to expo
+ }
}
}
}
« no previous file with comments | « no previous file | src/compiler/verifier.cc » ('j') | src/compiler/verifier.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698