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

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

Issue 10887009: Refactor branch instructions to enable further optimizations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/il_printer.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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/cha.h" 7 #include "vm/cha.h"
8 #include "vm/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/hash_map.h" 9 #include "vm/hash_map.h"
10 #include "vm/il_printer.h" 10 #include "vm/il_printer.h"
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 comp->set_receiver_class_id(kNumberCid); 745 comp->set_receiver_class_id(kNumberCid);
746 } 746 }
747 } 747 }
748 748
749 749
750 void FlowGraphOptimizer::VisitBind(BindInstr* instr) { 750 void FlowGraphOptimizer::VisitBind(BindInstr* instr) {
751 instr->computation()->Accept(this, instr); 751 instr->computation()->Accept(this, instr);
752 } 752 }
753 753
754 754
755 void FlowGraphOptimizer::VisitBranch(BranchInstr* instr) {
756 instr->computation()->Accept(this, NULL);
757 }
758
759
755 void FlowGraphTypePropagator::VisitAssertAssignable(AssertAssignableComp* comp, 760 void FlowGraphTypePropagator::VisitAssertAssignable(AssertAssignableComp* comp,
756 BindInstr* instr) { 761 BindInstr* instr) {
757 if (FLAG_eliminate_type_checks && 762 if (FLAG_eliminate_type_checks &&
758 !comp->is_eliminated() && 763 !comp->is_eliminated() &&
759 comp->value()->CompileTypeIsMoreSpecificThan(comp->dst_type())) { 764 comp->value()->CompileTypeIsMoreSpecificThan(comp->dst_type())) {
760 // TODO(regis): Remove is_eliminated_ field and support. 765 // TODO(regis): Remove is_eliminated_ field and support.
761 comp->eliminate(); 766 comp->eliminate();
762 767
763 UseVal* use = comp->value()->AsUse(); 768 UseVal* use = comp->value()->AsUse();
764 ASSERT(use != NULL); 769 ASSERT(use != NULL);
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 DirectChainedHashMap<BindInstr*> child_map(*map); // Copy map. 1069 DirectChainedHashMap<BindInstr*> child_map(*map); // Copy map.
1065 OptimizeRecursive(child, &child_map); 1070 OptimizeRecursive(child, &child_map);
1066 } else { 1071 } else {
1067 OptimizeRecursive(child, map); // Reuse map for the last child. 1072 OptimizeRecursive(child, map); // Reuse map for the last child.
1068 } 1073 }
1069 } 1074 }
1070 } 1075 }
1071 1076
1072 1077
1073 } // namespace dart 1078 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698