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

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

Issue 747023002: Undo changes to type propagation and canonicalization from my previous CL. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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_type_propagator.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) 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/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 } 530 }
531 531
532 // Attempt to sink allocations of temporary non-escaping objects to 532 // Attempt to sink allocations of temporary non-escaping objects to
533 // the deoptimization path. 533 // the deoptimization path.
534 AllocationSinking* sinking = NULL; 534 AllocationSinking* sinking = NULL;
535 if (FLAG_allocation_sinking && 535 if (FLAG_allocation_sinking &&
536 (flow_graph->graph_entry()->SuccessorCount() == 1)) { 536 (flow_graph->graph_entry()->SuccessorCount() == 1)) {
537 // TODO(fschneider): Support allocation sinking with try-catch. 537 // TODO(fschneider): Support allocation sinking with try-catch.
538 sinking = new AllocationSinking(flow_graph); 538 sinking = new AllocationSinking(flow_graph);
539 sinking->Optimize(); 539 sinking->Optimize();
540 DEBUG_ASSERT(flow_graph->VerifyUseLists());
541 } 540 }
542
543 // Recompute types after load elimination to ensure correct
544 // types for created phi-instructions.
545 FlowGraphTypePropagator::Propagate(flow_graph);
546 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 541 DEBUG_ASSERT(flow_graph->VerifyUseLists());
547 542
548 // Ensure that all phis inserted by optimization passes have consistent 543 // Ensure that all phis inserted by optimization passes have consistent
549 // representations. 544 // representations.
550 optimizer.SelectRepresentations(); 545 optimizer.SelectRepresentations();
551 546
552 if (optimizer.Canonicalize()) { 547 if (optimizer.Canonicalize()) {
553 // To fully remove redundant boxing (e.g. BoxDouble used only in 548 // To fully remove redundant boxing (e.g. BoxDouble used only in
554 // environments and UnboxDouble instructions) instruction we 549 // environments and UnboxDouble instructions) instruction we
555 // first need to replace all their uses and then fold them away. 550 // first need to replace all their uses and then fold them away.
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 const Object& result = 1062 const Object& result =
1068 PassiveObject::Handle(isolate->object_store()->sticky_error()); 1063 PassiveObject::Handle(isolate->object_store()->sticky_error());
1069 isolate->object_store()->clear_sticky_error(); 1064 isolate->object_store()->clear_sticky_error();
1070 return result.raw(); 1065 return result.raw();
1071 } 1066 }
1072 UNREACHABLE(); 1067 UNREACHABLE();
1073 return Object::null(); 1068 return Object::null();
1074 } 1069 }
1075 1070
1076 } // namespace dart 1071 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698