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

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

Issue 10546154: Restore changes lost in merge for r8626 (equality operation). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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/intermediate_language_ia32.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/flow_graph_builder.h" 7 #include "vm/flow_graph_builder.h"
8 #include "vm/il_printer.h" 8 #include "vm/il_printer.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 10
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 615
616 616
617 void FlowGraphOptimizer::VisitStrictCompareComp(StrictCompareComp* comp) { 617 void FlowGraphOptimizer::VisitStrictCompareComp(StrictCompareComp* comp) {
618 // TODO(vegorov): recognize the pattern with BooleanNegate between comparsion 618 // TODO(vegorov): recognize the pattern with BooleanNegate between comparsion
619 // and a branch. 619 // and a branch.
620 TryFuseComparisonWithBranch(comp); 620 TryFuseComparisonWithBranch(comp);
621 } 621 }
622 622
623 623
624 void FlowGraphOptimizer::VisitEqualityCompare(EqualityCompareComp* comp) { 624 void FlowGraphOptimizer::VisitEqualityCompare(EqualityCompareComp* comp) {
625 if (!comp->HasICData()) return;
626 const ICData& ic_data = *comp->ic_data();
627 if (ic_data.NumberOfChecks() != 1) return;
628 ASSERT(HasOneTarget(ic_data));
629 if (HasTwoSmi(ic_data)) {
630 comp->set_operands_class_id(kSmi);
631 } else {
632 return;
633 }
625 // TODO(vegorov): recognize the pattern with BooleanNegate between comparsion 634 // TODO(vegorov): recognize the pattern with BooleanNegate between comparsion
626 // and a branch. 635 // and a branch.
627 TryFuseComparisonWithBranch(comp); 636 TryFuseComparisonWithBranch(comp);
628 } 637 }
629 638
630 639
631 void FlowGraphOptimizer::VisitDo(DoInstr* instr) { 640 void FlowGraphOptimizer::VisitDo(DoInstr* instr) {
632 instr->computation()->Accept(this); 641 instr->computation()->Accept(this);
633 } 642 }
634 643
635 644
636 void FlowGraphOptimizer::VisitBind(BindInstr* instr) { 645 void FlowGraphOptimizer::VisitBind(BindInstr* instr) {
637 instr->computation()->Accept(this); 646 instr->computation()->Accept(this);
638 } 647 }
639 648
640 649
641 } // namespace dart 650 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698