| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/precompiler.h" | 5 #include "vm/precompiler.h" |
| 6 | 6 |
| 7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/branch_optimizer.h" | 10 #include "vm/branch_optimizer.h" |
| (...skipping 2816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2827 if (print_flow_graph) { | 2827 if (print_flow_graph) { |
| 2828 FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph); | 2828 FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph); |
| 2829 } | 2829 } |
| 2830 | 2830 |
| 2831 if (optimized()) { | 2831 if (optimized()) { |
| 2832 #ifndef PRODUCT | 2832 #ifndef PRODUCT |
| 2833 TimelineDurationScope tds(thread(), compiler_timeline, "ComputeSSA"); | 2833 TimelineDurationScope tds(thread(), compiler_timeline, "ComputeSSA"); |
| 2834 #endif // !PRODUCT | 2834 #endif // !PRODUCT |
| 2835 CSTAT_TIMER_SCOPE(thread(), ssa_timer); | 2835 CSTAT_TIMER_SCOPE(thread(), ssa_timer); |
| 2836 // Transform to SSA (virtual register 0 and no inlining arguments). | 2836 // Transform to SSA (virtual register 0 and no inlining arguments). |
| 2837 flow_graph->ComputeSSA(0, NULL); | 2837 flow_graph->ComputeSSA(0, NULL, NULL); |
| 2838 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 2838 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 2839 if (print_flow_graph) { | 2839 if (print_flow_graph) { |
| 2840 FlowGraphPrinter::PrintGraph("After SSA", flow_graph); | 2840 FlowGraphPrinter::PrintGraph("After SSA", flow_graph); |
| 2841 } | 2841 } |
| 2842 } | 2842 } |
| 2843 | 2843 |
| 2844 // Maps inline_id_to_function[inline_id] -> function. Top scope | 2844 // Maps inline_id_to_function[inline_id] -> function. Top scope |
| 2845 // function has inline_id 0. The map is populated by the inliner. | 2845 // function has inline_id 0. The map is populated by the inliner. |
| 2846 GrowableArray<const Function*> inline_id_to_function; | 2846 GrowableArray<const Function*> inline_id_to_function; |
| 2847 // Token position where inlining occured. | 2847 // Token position where inlining occured. |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3363 | 3363 |
| 3364 ASSERT(FLAG_precompiled_mode); | 3364 ASSERT(FLAG_precompiled_mode); |
| 3365 const bool optimized = function.IsOptimizable(); // False for natives. | 3365 const bool optimized = function.IsOptimizable(); // False for natives. |
| 3366 DartPrecompilationPipeline pipeline(zone, field_type_map); | 3366 DartPrecompilationPipeline pipeline(zone, field_type_map); |
| 3367 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); | 3367 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); |
| 3368 } | 3368 } |
| 3369 | 3369 |
| 3370 #endif // DART_PRECOMPILER | 3370 #endif // DART_PRECOMPILER |
| 3371 | 3371 |
| 3372 } // namespace dart | 3372 } // namespace dart |
| OLD | NEW |