OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 OS::Print("Before Inlining of %s\n", flow_graph_-> | 492 OS::Print("Before Inlining of %s\n", flow_graph_-> |
493 parsed_function().function().ToFullyQualifiedCString()); | 493 parsed_function().function().ToFullyQualifiedCString()); |
494 FlowGraphPrinter printer(*flow_graph_); | 494 FlowGraphPrinter printer(*flow_graph_); |
495 printer.PrintBlocks(); | 495 printer.PrintBlocks(); |
496 } | 496 } |
497 | 497 |
498 CallSiteInliner inliner(flow_graph_); | 498 CallSiteInliner inliner(flow_graph_); |
499 inliner.InlineCalls(); | 499 inliner.InlineCalls(); |
500 | 500 |
501 if (inliner.inlined()) { | 501 if (inliner.inlined()) { |
| 502 flow_graph_->RepairGraphAfterInlining(); |
502 if (FLAG_trace_inlining) { | 503 if (FLAG_trace_inlining) { |
503 OS::Print("Inlining growth factor: %f\n", inliner.GrowthFactor()); | 504 OS::Print("Inlining growth factor: %f\n", inliner.GrowthFactor()); |
504 if (FLAG_print_flow_graph) { | 505 if (FLAG_print_flow_graph) { |
505 OS::Print("After Inlining of %s\n", flow_graph_-> | 506 OS::Print("After Inlining of %s\n", flow_graph_-> |
506 parsed_function().function().ToFullyQualifiedCString()); | 507 parsed_function().function().ToFullyQualifiedCString()); |
507 FlowGraphPrinter printer(*flow_graph_); | 508 FlowGraphPrinter printer(*flow_graph_); |
508 printer.PrintBlocks(); | 509 printer.PrintBlocks(); |
509 } | 510 } |
510 } | 511 } |
511 } | 512 } |
512 } | 513 } |
513 | 514 |
514 } // namespace dart | 515 } // namespace dart |
OLD | NEW |