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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 OS::Print("Before Inlining of %s\n", flow_graph_-> | 417 OS::Print("Before Inlining of %s\n", flow_graph_-> |
418 parsed_function().function().ToFullyQualifiedCString()); | 418 parsed_function().function().ToFullyQualifiedCString()); |
419 FlowGraphPrinter printer(*flow_graph_); | 419 FlowGraphPrinter printer(*flow_graph_); |
420 printer.PrintBlocks(); | 420 printer.PrintBlocks(); |
421 } | 421 } |
422 | 422 |
423 CallSiteInliner inliner(flow_graph_); | 423 CallSiteInliner inliner(flow_graph_); |
424 inliner.InlineCalls(); | 424 inliner.InlineCalls(); |
425 | 425 |
426 if (inliner.inlined()) { | 426 if (inliner.inlined()) { |
| 427 flow_graph_->RepairGraphAfterInlining(); |
427 if (FLAG_trace_inlining) { | 428 if (FLAG_trace_inlining) { |
428 OS::Print("Inlining growth factor: %f\n", inliner.GrowthFactor()); | 429 OS::Print("Inlining growth factor: %f\n", inliner.GrowthFactor()); |
429 if (FLAG_print_flow_graph) { | 430 if (FLAG_print_flow_graph) { |
430 OS::Print("After Inlining of %s\n", flow_graph_-> | 431 OS::Print("After Inlining of %s\n", flow_graph_-> |
431 parsed_function().function().ToFullyQualifiedCString()); | 432 parsed_function().function().ToFullyQualifiedCString()); |
432 FlowGraphPrinter printer(*flow_graph_); | 433 FlowGraphPrinter printer(*flow_graph_); |
433 printer.PrintBlocks(); | 434 printer.PrintBlocks(); |
434 } | 435 } |
435 } | 436 } |
436 } | 437 } |
437 } | 438 } |
438 | 439 |
439 } // namespace dart | 440 } // namespace dart |
OLD | NEW |