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

Unified Diff: src/compiler/scheduler.cc

Issue 696643002: Minor cleanup about unscheduled use count for fixed nodes. (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 109f50d3f046ddb5b551b9f9261b167137779bbf..a3ed35995575a9631a0d464abb20a64fb5734143 100644
--- a/src/compiler/scheduler.cc
+++ b/src/compiler/scheduler.cc
@@ -147,8 +147,6 @@ void Scheduler::UpdatePlacement(Node* node, Placement placement) {
// schedulable. If all the uses of a node have been scheduled, then the node
// itself can be scheduled.
for (InputIter i = node->inputs().begin(); i != node->inputs().end(); ++i) {
- // TODO(mstarzinger): Another cheap hack for use counts.
- if (GetData(*i)->placement_ == kFixed) continue;
DecrementUnscheduledUseCount(*i, i.index(), i.edge().from());
}
}
@@ -167,6 +165,9 @@ void Scheduler::IncrementUnscheduledUseCount(Node* node, int index,
// Make sure that control edges from coupled nodes are not counted.
if (IsCoupledControlEdge(from, index)) return;
+ // Tracking use counts for fixed nodes is useless.
+ if (GetPlacement(node) == kFixed) return;
+
// Use count for coupled nodes is summed up on their control.
if (GetPlacement(node) == kCoupled) {
Node* control = NodeProperties::GetControlInput(node);
@@ -187,6 +188,9 @@ void Scheduler::DecrementUnscheduledUseCount(Node* node, int index,
// Make sure that control edges from coupled nodes are not counted.
if (IsCoupledControlEdge(from, index)) return;
+ // Tracking use counts for fixed nodes is useless.
+ if (GetPlacement(node) == kFixed) return;
+
// Use count for coupled nodes is summed up on their control.
if (GetPlacement(node) == kCoupled) {
Node* control = NodeProperties::GetControlInput(node);
@@ -1014,7 +1018,7 @@ class PrepareUsesVisitor : public NullNodeVisitor {
scheduler_->schedule_root_nodes_.push_back(node);
if (!schedule_->IsScheduled(node)) {
// Make sure root nodes are scheduled in their respective blocks.
- Trace(" Scheduling fixed position node #%d:%s\n", node->id(),
+ Trace("Scheduling fixed position node #%d:%s\n", node->id(),
node->op()->mnemonic());
IrOpcode::Value opcode = node->opcode();
BasicBlock* block =
« 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