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

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

Issue 10915234: Mark phi as producing a smi value if it is dominated by SmiChecks over its operands. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve handling of phi-cycles. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/flow_graph.h » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 DEBUG_ASSERT(flow_graph->ValidateUseLists()); 196 DEBUG_ASSERT(flow_graph->ValidateUseLists());
197 } 197 }
198 198
199 // Propagate types and eliminate more type tests. 199 // Propagate types and eliminate more type tests.
200 FlowGraphTypePropagator propagator(*flow_graph); 200 FlowGraphTypePropagator propagator(*flow_graph);
201 propagator.PropagateTypes(); 201 propagator.PropagateTypes();
202 202
203 // Verify that the use lists are still valid. 203 // Verify that the use lists are still valid.
204 DEBUG_ASSERT(flow_graph->ValidateUseLists()); 204 DEBUG_ASSERT(flow_graph->ValidateUseLists());
205 205
206 // Propagate sminess from CheckSmi to phis.
207 optimizer.PropagateSminess();
208
206 // Do optimizations that depend on the propagated type information. 209 // Do optimizations that depend on the propagated type information.
207 optimizer.OptimizeComputations(); 210 optimizer.OptimizeComputations();
208 211
209 // Unbox doubles. 212 // Unbox doubles.
210 flow_graph->ComputeUseLists(); 213 flow_graph->ComputeUseLists();
211 optimizer.SelectRepresentations(); 214 optimizer.SelectRepresentations();
212 215
213 if (FLAG_cse) { 216 if (FLAG_cse) {
214 flow_graph->ComputeUseLists(); 217 flow_graph->ComputeUseLists();
215 DominatorBasedCSE::Optimize(flow_graph->graph_entry()); 218 DominatorBasedCSE::Optimize(flow_graph->graph_entry());
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 result = isolate->object_store()->sticky_error(); 579 result = isolate->object_store()->sticky_error();
577 isolate->object_store()->clear_sticky_error(); 580 isolate->object_store()->clear_sticky_error();
578 isolate->set_long_jump_base(base); 581 isolate->set_long_jump_base(base);
579 return result.raw(); 582 return result.raw();
580 } 583 }
581 UNREACHABLE(); 584 UNREACHABLE();
582 return Object::null(); 585 return Object::null();
583 } 586 }
584 587
585 } // namespace dart 588 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph.h » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698