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 3183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3194 // Unbox doubles. Performed after constant propagation to minimize | 3194 // Unbox doubles. Performed after constant propagation to minimize |
3195 // interference from phis merging double values and tagged | 3195 // interference from phis merging double values and tagged |
3196 // values coming from dead paths. | 3196 // values coming from dead paths. |
3197 flow_graph->SelectRepresentations(); | 3197 flow_graph->SelectRepresentations(); |
3198 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 3198 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
3199 } | 3199 } |
3200 | 3200 |
3201 { | 3201 { |
3202 #ifndef PRODUCT | 3202 #ifndef PRODUCT |
3203 TimelineDurationScope tds2(thread(), compiler_timeline, | 3203 TimelineDurationScope tds2(thread(), compiler_timeline, |
3204 "CommonSubexpressionElinination"); | 3204 "CommonSubexpressionElimination"); |
3205 #endif // !PRODUCT | 3205 #endif // !PRODUCT |
3206 if (FLAG_common_subexpression_elimination || | 3206 if (FLAG_common_subexpression_elimination || |
3207 FLAG_loop_invariant_code_motion) { | 3207 FLAG_loop_invariant_code_motion) { |
3208 flow_graph->ComputeBlockEffects(); | 3208 flow_graph->ComputeBlockEffects(); |
3209 } | 3209 } |
3210 | 3210 |
3211 if (FLAG_common_subexpression_elimination) { | 3211 if (FLAG_common_subexpression_elimination) { |
3212 if (DominatorBasedCSE::Optimize(flow_graph)) { | 3212 if (DominatorBasedCSE::Optimize(flow_graph)) { |
3213 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 3213 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
3214 flow_graph->Canonicalize(); | 3214 flow_graph->Canonicalize(); |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3565 | 3565 |
3566 ASSERT(FLAG_precompiled_mode); | 3566 ASSERT(FLAG_precompiled_mode); |
3567 const bool optimized = function.IsOptimizable(); // False for natives. | 3567 const bool optimized = function.IsOptimizable(); // False for natives. |
3568 DartPrecompilationPipeline pipeline(zone, field_type_map); | 3568 DartPrecompilationPipeline pipeline(zone, field_type_map); |
3569 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); | 3569 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); |
3570 } | 3570 } |
3571 | 3571 |
3572 #endif // DART_PRECOMPILER | 3572 #endif // DART_PRECOMPILER |
3573 | 3573 |
3574 } // namespace dart | 3574 } // namespace dart |
OLD | NEW |