| 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 3175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3186 // Unbox doubles. Performed after constant propagation to minimize | 3186 // Unbox doubles. Performed after constant propagation to minimize |
| 3187 // interference from phis merging double values and tagged | 3187 // interference from phis merging double values and tagged |
| 3188 // values coming from dead paths. | 3188 // values coming from dead paths. |
| 3189 flow_graph->SelectRepresentations(); | 3189 flow_graph->SelectRepresentations(); |
| 3190 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 3190 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 3191 } | 3191 } |
| 3192 | 3192 |
| 3193 { | 3193 { |
| 3194 #ifndef PRODUCT | 3194 #ifndef PRODUCT |
| 3195 TimelineDurationScope tds2(thread(), compiler_timeline, | 3195 TimelineDurationScope tds2(thread(), compiler_timeline, |
| 3196 "CommonSubexpressionElinination"); | 3196 "CommonSubexpressionElimination"); |
| 3197 #endif // !PRODUCT | 3197 #endif // !PRODUCT |
| 3198 if (FLAG_common_subexpression_elimination || | 3198 if (FLAG_common_subexpression_elimination || |
| 3199 FLAG_loop_invariant_code_motion) { | 3199 FLAG_loop_invariant_code_motion) { |
| 3200 flow_graph->ComputeBlockEffects(); | 3200 flow_graph->ComputeBlockEffects(); |
| 3201 } | 3201 } |
| 3202 | 3202 |
| 3203 if (FLAG_common_subexpression_elimination) { | 3203 if (FLAG_common_subexpression_elimination) { |
| 3204 if (DominatorBasedCSE::Optimize(flow_graph)) { | 3204 if (DominatorBasedCSE::Optimize(flow_graph)) { |
| 3205 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 3205 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 3206 flow_graph->Canonicalize(); | 3206 flow_graph->Canonicalize(); |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3557 | 3557 |
| 3558 ASSERT(FLAG_precompiled_mode); | 3558 ASSERT(FLAG_precompiled_mode); |
| 3559 const bool optimized = function.IsOptimizable(); // False for natives. | 3559 const bool optimized = function.IsOptimizable(); // False for natives. |
| 3560 DartPrecompilationPipeline pipeline(zone, field_type_map); | 3560 DartPrecompilationPipeline pipeline(zone, field_type_map); |
| 3561 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); | 3561 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); |
| 3562 } | 3562 } |
| 3563 | 3563 |
| 3564 #endif // DART_PRECOMPILER | 3564 #endif // DART_PRECOMPILER |
| 3565 | 3565 |
| 3566 } // namespace dart | 3566 } // namespace dart |
| OLD | NEW |