Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(723)

Side by Side Diff: runtime/vm/precompiler.cc

Issue 3001403002: [vm] Cleanup Instruction::Dependencies(), EffectSet, BlockEffects (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/redundancy_elimination.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2946 matching lines...) Expand 10 before | Expand all | Expand 10 after
2957 // values coming from dead paths. 2957 // values coming from dead paths.
2958 flow_graph->SelectRepresentations(); 2958 flow_graph->SelectRepresentations();
2959 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 2959 DEBUG_ASSERT(flow_graph->VerifyUseLists());
2960 } 2960 }
2961 2961
2962 { 2962 {
2963 #ifndef PRODUCT 2963 #ifndef PRODUCT
2964 TimelineDurationScope tds2(thread(), compiler_timeline, 2964 TimelineDurationScope tds2(thread(), compiler_timeline,
2965 "CommonSubexpressionElimination"); 2965 "CommonSubexpressionElimination");
2966 #endif // !PRODUCT 2966 #endif // !PRODUCT
2967 if (FLAG_common_subexpression_elimination ||
2968 FLAG_loop_invariant_code_motion) {
2969 flow_graph->ComputeBlockEffects();
2970 }
2971 2967
2972 if (FLAG_common_subexpression_elimination) { 2968 if (FLAG_common_subexpression_elimination) {
2973 if (DominatorBasedCSE::Optimize(flow_graph)) { 2969 if (DominatorBasedCSE::Optimize(flow_graph)) {
2974 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 2970 DEBUG_ASSERT(flow_graph->VerifyUseLists());
2975 flow_graph->Canonicalize(); 2971 flow_graph->Canonicalize();
2976 // Do another round of CSE to take secondary effects into account: 2972 // Do another round of CSE to take secondary effects into account:
2977 // e.g. when eliminating dependent loads (a.x[0] + a.x[0]) 2973 // e.g. when eliminating dependent loads (a.x[0] + a.x[0])
2978 // TODO(fschneider): Change to a one-pass optimization pass. 2974 // TODO(fschneider): Change to a one-pass optimization pass.
2979 if (DominatorBasedCSE::Optimize(flow_graph)) { 2975 if (DominatorBasedCSE::Optimize(flow_graph)) {
2980 flow_graph->Canonicalize(); 2976 flow_graph->Canonicalize();
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
3326 3322
3327 ASSERT(FLAG_precompiled_mode); 3323 ASSERT(FLAG_precompiled_mode);
3328 const bool optimized = function.IsOptimizable(); // False for natives. 3324 const bool optimized = function.IsOptimizable(); // False for natives.
3329 DartPrecompilationPipeline pipeline(zone, field_type_map); 3325 DartPrecompilationPipeline pipeline(zone, field_type_map);
3330 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3326 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3331 } 3327 }
3332 3328
3333 #endif // DART_PRECOMPILER 3329 #endif // DART_PRECOMPILER
3334 3330
3335 } // namespace dart 3331 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/redundancy_elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698