| 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/block_scheduler.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 function.optimized_instruction_count(), | 641 function.optimized_instruction_count(), |
| 642 function.optimized_call_site_count(), | 642 function.optimized_call_site_count(), |
| 643 constant_arguments)); | 643 constant_arguments)); |
| 644 PRINT_INLINING_TREE("Early heuristic", | 644 PRINT_INLINING_TREE("Early heuristic", |
| 645 &call_data->caller, &function, call_data->call); | 645 &call_data->caller, &function, call_data->call); |
| 646 return false; | 646 return false; |
| 647 } | 647 } |
| 648 | 648 |
| 649 // Abort if this is a recursive occurrence. | 649 // Abort if this is a recursive occurrence. |
| 650 Definition* call = call_data->call; | 650 Definition* call = call_data->call; |
| 651 const bool is_recursive_call = IsCallRecursive(unoptimized_code, call); | 651 // Added 'volatile' works around a possible GCC 4.9 compiler bug. |
| 652 volatile bool is_recursive_call = IsCallRecursive(unoptimized_code, call); |
| 652 if (is_recursive_call && | 653 if (is_recursive_call && |
| 653 inlining_recursion_depth_ >= FLAG_inlining_recursion_depth_threshold) { | 654 inlining_recursion_depth_ >= FLAG_inlining_recursion_depth_threshold) { |
| 654 TRACE_INLINING(OS::Print(" Bailout: recursive function\n")); | 655 TRACE_INLINING(OS::Print(" Bailout: recursive function\n")); |
| 655 PRINT_INLINING_TREE("Recursive function", | 656 PRINT_INLINING_TREE("Recursive function", |
| 656 &call_data->caller, &function, call_data->call); | 657 &call_data->caller, &function, call_data->call); |
| 657 return false; | 658 return false; |
| 658 } | 659 } |
| 659 | 660 |
| 660 // Save and clear deopt id. | 661 // Save and clear deopt id. |
| 661 const intptr_t prev_deopt_id = isolate()->deopt_id(); | 662 const intptr_t prev_deopt_id = isolate()->deopt_id(); |
| (...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1772 OS::Print("After Inlining of %s\n", flow_graph_-> | 1773 OS::Print("After Inlining of %s\n", flow_graph_-> |
| 1773 parsed_function().function().ToFullyQualifiedCString()); | 1774 parsed_function().function().ToFullyQualifiedCString()); |
| 1774 FlowGraphPrinter printer(*flow_graph_); | 1775 FlowGraphPrinter printer(*flow_graph_); |
| 1775 printer.PrintBlocks(); | 1776 printer.PrintBlocks(); |
| 1776 } | 1777 } |
| 1777 } | 1778 } |
| 1778 } | 1779 } |
| 1779 } | 1780 } |
| 1780 | 1781 |
| 1781 } // namespace dart | 1782 } // namespace dart |
| OLD | NEW |