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

Side by Side Diff: src/compiler/scheduler.cc

Issue 682983003: Make floating merges respected minimum RPO of coupled pihs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <deque> 5 #include <deque>
6 #include <queue> 6 #include <queue>
7 7
8 #include "src/compiler/scheduler.h" 8 #include "src/compiler/scheduler.h"
9 9
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 995
996 // Propagates {block} as another minimum RPO placement into the given {node}. 996 // Propagates {block} as another minimum RPO placement into the given {node}.
997 // This has the net effect of computing the maximum of the minimum RPOs for 997 // This has the net effect of computing the maximum of the minimum RPOs for
998 // all inputs to {node} when the queue has been fully processed. 998 // all inputs to {node} when the queue has been fully processed.
999 void PropagateMinimumRPOToNode(BasicBlock* block, Node* node) { 999 void PropagateMinimumRPOToNode(BasicBlock* block, Node* node) {
1000 Scheduler::SchedulerData* data = scheduler_->GetData(node); 1000 Scheduler::SchedulerData* data = scheduler_->GetData(node);
1001 1001
1002 // No need to propagate to fixed node, it's guaranteed to be a root. 1002 // No need to propagate to fixed node, it's guaranteed to be a root.
1003 if (scheduler_->GetPlacement(node) == Scheduler::kFixed) return; 1003 if (scheduler_->GetPlacement(node) == Scheduler::kFixed) return;
1004 1004
1005 // Coupled nodes influence schedule early position of their control.
1006 if (scheduler_->GetPlacement(node) == Scheduler::kCoupled) {
1007 Node* control = NodeProperties::GetControlInput(node);
1008 PropagateMinimumRPOToNode(block, control);
1009 }
1010
1005 // Propagate new position if it is larger than the current. 1011 // Propagate new position if it is larger than the current.
1006 if (block->rpo_number() > data->minimum_block_->rpo_number()) { 1012 if (block->rpo_number() > data->minimum_block_->rpo_number()) {
1007 data->minimum_block_ = block; 1013 data->minimum_block_ = block;
1008 queue_.push(node); 1014 queue_.push(node);
1009 Trace("Propagating #%d:%s minimum_rpo = %d\n", node->id(), 1015 Trace("Propagating #%d:%s minimum_rpo = %d\n", node->id(),
1010 node->op()->mnemonic(), data->minimum_block_->rpo_number()); 1016 node->op()->mnemonic(), data->minimum_block_->rpo_number());
1011 } 1017 }
1012 } 1018 }
1013 1019
1014 Scheduler* scheduler_; 1020 Scheduler* scheduler_;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 start->ReplaceInput(NodeProperties::FirstControlIndex(start), block_start); 1303 start->ReplaceInput(NodeProperties::FirstControlIndex(start), block_start);
1298 1304
1299 Trace(" Connecting floating control start %d:%s to %d:%s\n", start->id(), 1305 Trace(" Connecting floating control start %d:%s to %d:%s\n", start->id(),
1300 start->op()->mnemonic(), block_start->id(), 1306 start->op()->mnemonic(), block_start->id(),
1301 block_start->op()->mnemonic()); 1307 block_start->op()->mnemonic());
1302 } 1308 }
1303 1309
1304 } // namespace compiler 1310 } // namespace compiler
1305 } // namespace internal 1311 } // namespace internal
1306 } // namespace v8 1312 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698