| 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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 ASSERT(arguments->length() == function.NumParameters()); | 484 ASSERT(arguments->length() == function.NumParameters()); |
| 485 ASSERT(param_stubs.length() == callee_graph->parameter_count()); | 485 ASSERT(param_stubs.length() == callee_graph->parameter_count()); |
| 486 | 486 |
| 487 { | 487 { |
| 488 TimerScope timer(FLAG_compiler_stats, | 488 TimerScope timer(FLAG_compiler_stats, |
| 489 &CompilerStats::graphinliner_ssa_timer, | 489 &CompilerStats::graphinliner_ssa_timer, |
| 490 isolate); | 490 isolate); |
| 491 // Compute SSA on the callee graph, catching bailouts. | 491 // Compute SSA on the callee graph, catching bailouts. |
| 492 callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(), | 492 callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(), |
| 493 ¶m_stubs); | 493 ¶m_stubs); |
| 494 callee_graph->ComputeUseLists(); | 494 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
| 495 } | 495 } |
| 496 | 496 |
| 497 { | 497 { |
| 498 TimerScope timer(FLAG_compiler_stats, | 498 TimerScope timer(FLAG_compiler_stats, |
| 499 &CompilerStats::graphinliner_opt_timer, | 499 &CompilerStats::graphinliner_opt_timer, |
| 500 isolate); | 500 isolate); |
| 501 // TODO(zerny): Do more optimization passes on the callee graph. | 501 // TODO(zerny): Do more optimization passes on the callee graph. |
| 502 FlowGraphOptimizer optimizer(callee_graph); | 502 FlowGraphOptimizer optimizer(callee_graph); |
| 503 optimizer.ApplyICData(); | 503 optimizer.ApplyICData(); |
| 504 DEBUG_ASSERT(callee_graph->VerifyUseLists()); | 504 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 OS::Print("After Inlining of %s\n", flow_graph_-> | 869 OS::Print("After Inlining of %s\n", flow_graph_-> |
| 870 parsed_function().function().ToFullyQualifiedCString()); | 870 parsed_function().function().ToFullyQualifiedCString()); |
| 871 FlowGraphPrinter printer(*flow_graph_); | 871 FlowGraphPrinter printer(*flow_graph_); |
| 872 printer.PrintBlocks(); | 872 printer.PrintBlocks(); |
| 873 } | 873 } |
| 874 } | 874 } |
| 875 } | 875 } |
| 876 } | 876 } |
| 877 | 877 |
| 878 } // namespace dart | 878 } // namespace dart |
| OLD | NEW |