| 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> |
| 8 |
| 7 #include "src/bit-vector.h" | 9 #include "src/bit-vector.h" |
| 8 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
| 9 #include "src/compiler/control-equivalence.h" | 11 #include "src/compiler/control-equivalence.h" |
| 10 #include "src/compiler/graph.h" | 12 #include "src/compiler/graph.h" |
| 11 #include "src/compiler/node.h" | 13 #include "src/compiler/node.h" |
| 12 #include "src/compiler/node-marker.h" | 14 #include "src/compiler/node-marker.h" |
| 13 #include "src/compiler/node-properties.h" | 15 #include "src/compiler/node-properties.h" |
| 14 #include "src/zone-containers.h" | 16 #include "src/zone-containers.h" |
| 15 | 17 |
| 16 namespace v8 { | 18 namespace v8 { |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 os << " ("; | 945 os << " ("; |
| 944 for (size_t i = 0; i < loops_.size(); i++) { | 946 for (size_t i = 0; i < loops_.size(); i++) { |
| 945 if (i > 0) os << " "; | 947 if (i > 0) os << " "; |
| 946 os << "B" << loops_[i].header->id(); | 948 os << "B" << loops_[i].header->id(); |
| 947 } | 949 } |
| 948 os << ")"; | 950 os << ")"; |
| 949 } | 951 } |
| 950 os << ":\n"; | 952 os << ":\n"; |
| 951 | 953 |
| 952 for (BasicBlock* block = order_; block != NULL; block = block->rpo_next()) { | 954 for (BasicBlock* block = order_; block != NULL; block = block->rpo_next()) { |
| 953 BasicBlock::Id bid = block->id(); | 955 os << std::setw(5) << block->rpo_number() << ":"; |
| 954 // TODO(jarin,svenpanne): Add formatting here once we have support for | |
| 955 // that in streams (we want an equivalent of PrintF("%5d:", x) here). | |
| 956 os << " " << block->rpo_number() << ":"; | |
| 957 for (size_t i = 0; i < loops_.size(); i++) { | 956 for (size_t i = 0; i < loops_.size(); i++) { |
| 958 bool range = loops_[i].header->LoopContains(block); | 957 bool range = loops_[i].header->LoopContains(block); |
| 959 bool membership = loops_[i].header != block && range; | 958 bool membership = loops_[i].header != block && range; |
| 960 os << (membership ? " |" : " "); | 959 os << (membership ? " |" : " "); |
| 961 os << (range ? "x" : " "); | 960 os << (range ? "x" : " "); |
| 962 } | 961 } |
| 963 os << " B" << bid << ": "; | 962 os << " B" << block->id() << ": "; |
| 964 if (block->loop_end() != NULL) { | 963 if (block->loop_end() != NULL) { |
| 965 os << " range: [" << block->rpo_number() << ", " | 964 os << " range: [" << block->rpo_number() << ", " |
| 966 << block->loop_end()->rpo_number() << ")"; | 965 << block->loop_end()->rpo_number() << ")"; |
| 967 } | 966 } |
| 968 if (block->loop_header() != NULL) { | 967 if (block->loop_header() != NULL) { |
| 969 os << " header: B" << block->loop_header()->id(); | 968 os << " header: B" << block->loop_header()->id(); |
| 970 } | 969 } |
| 971 if (block->loop_depth() > 0) { | 970 if (block->loop_depth() > 0) { |
| 972 os << " depth: " << block->loop_depth(); | 971 os << " depth: " << block->loop_depth(); |
| 973 } | 972 } |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1660 for (Node* const node : *nodes) { | 1659 for (Node* const node : *nodes) { |
| 1661 schedule_->SetBlockForNode(to, node); | 1660 schedule_->SetBlockForNode(to, node); |
| 1662 scheduled_nodes_[to->id().ToSize()].push_back(node); | 1661 scheduled_nodes_[to->id().ToSize()].push_back(node); |
| 1663 } | 1662 } |
| 1664 nodes->clear(); | 1663 nodes->clear(); |
| 1665 } | 1664 } |
| 1666 | 1665 |
| 1667 } // namespace compiler | 1666 } // namespace compiler |
| 1668 } // namespace internal | 1667 } // namespace internal |
| 1669 } // namespace v8 | 1668 } // namespace v8 |
| OLD | NEW |