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

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

Issue 2709093003: Fixup redefinitions before doing code motion (Closed)
Patch Set: fix build Created 3 years, 10 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/flow_graph_type_propagator.cc ('k') | tests/language/vm/regress_licm_test.dart » ('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 3198 matching lines...) Expand 10 before | Expand all | Expand 10 after
3209 flow_graph->Canonicalize(); 3209 flow_graph->Canonicalize();
3210 } 3210 }
3211 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 3211 DEBUG_ASSERT(flow_graph->VerifyUseLists());
3212 } 3212 }
3213 } 3213 }
3214 3214
3215 // Run loop-invariant code motion right after load elimination since 3215 // Run loop-invariant code motion right after load elimination since
3216 // it depends on the numbering of loads from the previous 3216 // it depends on the numbering of loads from the previous
3217 // load-elimination. 3217 // load-elimination.
3218 if (FLAG_loop_invariant_code_motion) { 3218 if (FLAG_loop_invariant_code_motion) {
3219 flow_graph->RenameUsesDominatedByRedefinitions();
3220 DEBUG_ASSERT(flow_graph->VerifyRedefinitions());
3219 LICM licm(flow_graph); 3221 LICM licm(flow_graph);
3220 licm.Optimize(); 3222 licm.Optimize();
3221 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 3223 DEBUG_ASSERT(flow_graph->VerifyUseLists());
3222 } 3224 }
3223 flow_graph->RemoveRedefinitions(); 3225 flow_graph->RemoveRedefinitions();
3224 } 3226 }
3225 3227
3226 // Optimize (a << b) & c patterns, merge operations. 3228 // Optimize (a << b) & c patterns, merge operations.
3227 // Run after CSE in order to have more opportunity to merge 3229 // Run after CSE in order to have more opportunity to merge
3228 // instructions that have same inputs. 3230 // instructions that have same inputs.
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
3552 3554
3553 ASSERT(FLAG_precompiled_mode); 3555 ASSERT(FLAG_precompiled_mode);
3554 const bool optimized = function.IsOptimizable(); // False for natives. 3556 const bool optimized = function.IsOptimizable(); // False for natives.
3555 DartPrecompilationPipeline pipeline(zone, field_type_map); 3557 DartPrecompilationPipeline pipeline(zone, field_type_map);
3556 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3558 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3557 } 3559 }
3558 3560
3559 #endif // DART_PRECOMPILER 3561 #endif // DART_PRECOMPILER
3560 3562
3561 } // namespace dart 3563 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | tests/language/vm/regress_licm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698