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

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

Issue 14872002: Improve load forwarding: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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_builder.cc » ('j') | runtime/vm/flow_graph_builder.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 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 284 }
285 285
286 // The final canonicalization pass before the code generation. 286 // The final canonicalization pass before the code generation.
287 if (FLAG_propagate_types) { 287 if (FLAG_propagate_types) {
288 // Recompute types after code movement was done to ensure correct 288 // Recompute types after code movement was done to ensure correct
289 // reaching types for hoisted values. 289 // reaching types for hoisted values.
290 FlowGraphTypePropagator propagator(flow_graph); 290 FlowGraphTypePropagator propagator(flow_graph);
291 propagator.Propagate(); 291 propagator.Propagate();
292 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 292 DEBUG_ASSERT(flow_graph->VerifyUseLists());
293 } 293 }
294 optimizer.Canonicalize(); 294 if (optimizer.Canonicalize()) {
295 // To fully remove redundant boxing (e.g. BoxDouble used only in
296 // environments and UnboxDouble instructions) instruction we
297 // first need to replace all their uses and then fold them away.
298 // For now we just repeat Canonicalize twice to do that.
299 // TODO(vegorov): implement a separate representation folding pass.
300 optimizer.Canonicalize();
301 }
295 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 302 DEBUG_ASSERT(flow_graph->VerifyUseLists());
296 303
297 // Perform register allocation on the SSA graph. 304 // Perform register allocation on the SSA graph.
298 FlowGraphAllocator allocator(*flow_graph); 305 FlowGraphAllocator allocator(*flow_graph);
299 allocator.AllocateRegisters(); 306 allocator.AllocateRegisters();
300 307
301 if (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized) { 308 if (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized) {
302 FlowGraphPrinter::PrintGraph("After Optimizations", flow_graph); 309 FlowGraphPrinter::PrintGraph("After Optimizations", flow_graph);
303 } 310 }
304 } 311 }
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 Object::Handle(isolate->object_store()->sticky_error()); 708 Object::Handle(isolate->object_store()->sticky_error());
702 isolate->object_store()->clear_sticky_error(); 709 isolate->object_store()->clear_sticky_error();
703 isolate->set_long_jump_base(base); 710 isolate->set_long_jump_base(base);
704 return result.raw(); 711 return result.raw();
705 } 712 }
706 UNREACHABLE(); 713 UNREACHABLE();
707 return Object::null(); 714 return Object::null();
708 } 715 }
709 716
710 } // namespace dart 717 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | runtime/vm/flow_graph_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698