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

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

Issue 10960014: Implement range analysis for smi values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: addressed majority of comments 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_optimizer.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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 // Unbox doubles. 199 // Unbox doubles.
200 flow_graph->ComputeUseLists(); 200 flow_graph->ComputeUseLists();
201 optimizer.SelectRepresentations(); 201 optimizer.SelectRepresentations();
202 202
203 if (FLAG_cp || FLAG_cse) flow_graph->ComputeUseLists(); 203 if (FLAG_cp || FLAG_cse) flow_graph->ComputeUseLists();
204 if (FLAG_cp) ConstantPropagator::Optimize(flow_graph); 204 if (FLAG_cp) ConstantPropagator::Optimize(flow_graph);
205 if (FLAG_cse) DominatorBasedCSE::Optimize(flow_graph); 205 if (FLAG_cse) DominatorBasedCSE::Optimize(flow_graph);
206 if (FLAG_licm) LICM::Optimize(flow_graph); 206 if (FLAG_licm) LICM::Optimize(flow_graph);
207 207
208 // We have to perform range analysis after LICM because it
209 // optimistically moves CheckSmi through phis into loop preheaders
210 // making some phis smi.
ngeoffray 2012/09/24 21:44:15 The first part of the sentence makes you think it'
211 flow_graph->ComputeUseLists();
212 optimizer.InferSmiRanges();
213
208 // Perform register allocation on the SSA graph. 214 // Perform register allocation on the SSA graph.
209 FlowGraphAllocator allocator(*flow_graph); 215 FlowGraphAllocator allocator(*flow_graph);
210 allocator.AllocateRegisters(); 216 allocator.AllocateRegisters();
211 217
212 if (FLAG_print_flow_graph) { 218 if (FLAG_print_flow_graph) {
213 OS::Print("After Optimizations:\n"); 219 OS::Print("After Optimizations:\n");
214 FlowGraphPrinter printer(*flow_graph); 220 FlowGraphPrinter printer(*flow_graph);
215 printer.PrintBlocks(); 221 printer.PrintBlocks();
216 } 222 }
217 } 223 }
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 result = isolate->object_store()->sticky_error(); 568 result = isolate->object_store()->sticky_error();
563 isolate->object_store()->clear_sticky_error(); 569 isolate->object_store()->clear_sticky_error();
564 isolate->set_long_jump_base(base); 570 isolate->set_long_jump_base(base);
565 return result.raw(); 571 return result.raw();
566 } 572 }
567 UNREACHABLE(); 573 UNREACHABLE();
568 return Object::null(); 574 return Object::null();
569 } 575 }
570 576
571 } // namespace dart 577 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698