| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/flow_graph_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
| 6 | 6 |
| 7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/flow_graph.h" | 9 #include "vm/flow_graph.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 | 170 |
| 171 intptr_t call_site_count() const { return call_site_count_; } | 171 intptr_t call_site_count() const { return call_site_count_; } |
| 172 intptr_t instruction_count() const { return instruction_count_; } | 172 intptr_t instruction_count() const { return instruction_count_; } |
| 173 | 173 |
| 174 private: | 174 private: |
| 175 intptr_t call_site_count_; | 175 intptr_t call_site_count_; |
| 176 intptr_t instruction_count_; | 176 intptr_t instruction_count_; |
| 177 |
| 178 DISALLOW_COPY_AND_ASSIGN(GraphInfoCollector); |
| 177 }; | 179 }; |
| 178 | 180 |
| 179 | 181 |
| 180 // A collection of call sites to consider for inlining. | 182 // A collection of call sites to consider for inlining. |
| 181 class CallSites : public FlowGraphVisitor { | 183 class CallSites : public FlowGraphVisitor { |
| 182 public: | 184 public: |
| 183 explicit CallSites(FlowGraph* flow_graph) | 185 explicit CallSites(FlowGraph* flow_graph) |
| 184 : FlowGraphVisitor(flow_graph->postorder()), // We don't use this order. | 186 : FlowGraphVisitor(flow_graph->postorder()), // We don't use this order. |
| 185 static_calls_(), | 187 static_calls_(), |
| 186 closure_calls_(), | 188 closure_calls_(), |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 OS::Print("After Inlining of %s\n", flow_graph_-> | 871 OS::Print("After Inlining of %s\n", flow_graph_-> |
| 870 parsed_function().function().ToFullyQualifiedCString()); | 872 parsed_function().function().ToFullyQualifiedCString()); |
| 871 FlowGraphPrinter printer(*flow_graph_); | 873 FlowGraphPrinter printer(*flow_graph_); |
| 872 printer.PrintBlocks(); | 874 printer.PrintBlocks(); |
| 873 } | 875 } |
| 874 } | 876 } |
| 875 } | 877 } |
| 876 } | 878 } |
| 877 | 879 |
| 878 } // namespace dart | 880 } // namespace dart |
| OLD | NEW |