| OLD | NEW |
| 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 "src/compiler/scheduler.h" | 5 #include "src/compiler/scheduler.h" |
| 6 | 6 |
| 7 #include <iomanip> | 7 #include <iomanip> |
| 8 | 8 |
| 9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
| 10 #include "src/bit-vector.h" | 10 #include "src/bit-vector.h" |
| (...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 | 1580 |
| 1581 Node* CloneNode(Node* node) { | 1581 Node* CloneNode(Node* node) { |
| 1582 int const input_count = node->InputCount(); | 1582 int const input_count = node->InputCount(); |
| 1583 Node** const inputs = scheduler_->zone_->NewArray<Node*>(input_count); | 1583 Node** const inputs = scheduler_->zone_->NewArray<Node*>(input_count); |
| 1584 for (int index = 0; index < input_count; ++index) { | 1584 for (int index = 0; index < input_count; ++index) { |
| 1585 Node* const input = node->InputAt(index); | 1585 Node* const input = node->InputAt(index); |
| 1586 scheduler_->IncrementUnscheduledUseCount(input, index, node); | 1586 scheduler_->IncrementUnscheduledUseCount(input, index, node); |
| 1587 inputs[index] = input; | 1587 inputs[index] = input; |
| 1588 } | 1588 } |
| 1589 Node* copy = scheduler_->graph_->NewNode(node->op(), input_count, inputs); | 1589 Node* copy = scheduler_->graph_->NewNode(node->op(), input_count, inputs); |
| 1590 NodeProperties::CopyBounds(copy, node); |
| 1590 TRACE(("clone #%d:%s -> #%d\n"), node->id(), node->op()->mnemonic(), | 1591 TRACE(("clone #%d:%s -> #%d\n"), node->id(), node->op()->mnemonic(), |
| 1591 copy->id()); | 1592 copy->id()); |
| 1592 scheduler_->node_data_.resize(copy->id() + 1, | 1593 scheduler_->node_data_.resize(copy->id() + 1, |
| 1593 scheduler_->DefaultSchedulerData()); | 1594 scheduler_->DefaultSchedulerData()); |
| 1594 scheduler_->node_data_[copy->id()] = scheduler_->node_data_[node->id()]; | 1595 scheduler_->node_data_[copy->id()] = scheduler_->node_data_[node->id()]; |
| 1595 return copy; | 1596 return copy; |
| 1596 } | 1597 } |
| 1597 | 1598 |
| 1598 Scheduler* scheduler_; | 1599 Scheduler* scheduler_; |
| 1599 Schedule* schedule_; | 1600 Schedule* schedule_; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 for (Node* const node : *nodes) { | 1703 for (Node* const node : *nodes) { |
| 1703 schedule_->SetBlockForNode(to, node); | 1704 schedule_->SetBlockForNode(to, node); |
| 1704 scheduled_nodes_[to->id().ToSize()].push_back(node); | 1705 scheduled_nodes_[to->id().ToSize()].push_back(node); |
| 1705 } | 1706 } |
| 1706 nodes->clear(); | 1707 nodes->clear(); |
| 1707 } | 1708 } |
| 1708 | 1709 |
| 1709 } // namespace compiler | 1710 } // namespace compiler |
| 1710 } // namespace internal | 1711 } // namespace internal |
| 1711 } // namespace v8 | 1712 } // namespace v8 |
| OLD | NEW |