| 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/block_scheduler.h" |
| 7 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 8 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 9 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
| 10 #include "vm/flow_graph_builder.h" | 11 #include "vm/flow_graph_builder.h" |
| 11 #include "vm/flow_graph_compiler.h" | 12 #include "vm/flow_graph_compiler.h" |
| 12 #include "vm/flow_graph_optimizer.h" | 13 #include "vm/flow_graph_optimizer.h" |
| 13 #include "vm/il_printer.h" | 14 #include "vm/il_printer.h" |
| 14 #include "vm/intrinsifier.h" | 15 #include "vm/intrinsifier.h" |
| 15 #include "vm/longjump.h" | 16 #include "vm/longjump.h" |
| 16 #include "vm/object.h" | 17 #include "vm/object.h" |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 argument_names, | 549 argument_names, |
| 549 arguments, | 550 arguments, |
| 550 param_stubs, | 551 param_stubs, |
| 551 callee_graph); | 552 callee_graph); |
| 552 } | 553 } |
| 553 | 554 |
| 554 // After treating optional parameters the actual/formal count must match. | 555 // After treating optional parameters the actual/formal count must match. |
| 555 ASSERT(arguments->length() == function.NumParameters()); | 556 ASSERT(arguments->length() == function.NumParameters()); |
| 556 ASSERT(param_stubs->length() == callee_graph->parameter_count()); | 557 ASSERT(param_stubs->length() == callee_graph->parameter_count()); |
| 557 | 558 |
| 559 BlockScheduler block_scheduler(callee_graph); |
| 560 block_scheduler.AssignEdgeWeights(); |
| 561 |
| 558 { | 562 { |
| 559 TimerScope timer(FLAG_compiler_stats, | 563 TimerScope timer(FLAG_compiler_stats, |
| 560 &CompilerStats::graphinliner_ssa_timer, | 564 &CompilerStats::graphinliner_ssa_timer, |
| 561 isolate); | 565 isolate); |
| 562 // Compute SSA on the callee graph, catching bailouts. | 566 // Compute SSA on the callee graph, catching bailouts. |
| 563 callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(), | 567 callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(), |
| 564 param_stubs); | 568 param_stubs); |
| 565 DEBUG_ASSERT(callee_graph->VerifyUseLists()); | 569 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
| 566 } | 570 } |
| 567 | 571 |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 OS::Print("After Inlining of %s\n", flow_graph_-> | 1366 OS::Print("After Inlining of %s\n", flow_graph_-> |
| 1363 parsed_function().function().ToFullyQualifiedCString()); | 1367 parsed_function().function().ToFullyQualifiedCString()); |
| 1364 FlowGraphPrinter printer(*flow_graph_); | 1368 FlowGraphPrinter printer(*flow_graph_); |
| 1365 printer.PrintBlocks(); | 1369 printer.PrintBlocks(); |
| 1366 } | 1370 } |
| 1367 } | 1371 } |
| 1368 } | 1372 } |
| 1369 } | 1373 } |
| 1370 | 1374 |
| 1371 } // namespace dart | 1375 } // namespace dart |
| OLD | NEW |