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

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

Issue 10805008: Revert "Revert "Introduce Goto instructions to the flow graph."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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_compiler_x64.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/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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 if (next_comp->IsBooleanNegate()) { 512 if (next_comp->IsBooleanNegate()) {
513 Instruction* next_next_instr = next_instr->next(); 513 Instruction* next_next_instr = next_instr->next();
514 if ((next_next_instr != NULL) && next_next_instr->IsBranch()) { 514 if ((next_next_instr != NULL) && next_next_instr->IsBranch()) {
515 BooleanNegateComp* negate = next_comp->AsBooleanNegate(); 515 BooleanNegateComp* negate = next_comp->AsBooleanNegate();
516 BranchInstr* branch = next_next_instr->AsBranch(); 516 BranchInstr* branch = next_next_instr->AsBranch();
517 if ((branch->value()->AsUse()->definition() == next_instr) && 517 if ((branch->value()->AsUse()->definition() == next_instr) &&
518 (negate->value()->AsUse()->definition() == instr)) { 518 (negate->value()->AsUse()->definition() == instr)) {
519 comp->MarkFusedWithBranch(branch); 519 comp->MarkFusedWithBranch(branch);
520 branch->MarkFusedWithComparison(comp); 520 branch->MarkFusedWithComparison(comp);
521 branch->set_is_negated(true); 521 branch->set_is_negated(true);
522 522 // Remove the comparison and the boolean negation from the graph.
523 // Remove comparison and boolean negation from the graph.
524 branch->set_previous(instr->previous()); 523 branch->set_previous(instr->previous());
525 instr->previous()->set_next(branch); 524 instr->previous()->set_next(branch);
526 return; 525 return;
527 } 526 }
528 } 527 }
529 } 528 }
530 } 529 }
531 } 530 }
532 531
533 532
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 LocationSummary* locs = it.Current()->locs(); 593 LocationSummary* locs = it.Current()->locs();
595 if ((locs != NULL) && locs->is_call()) { 594 if ((locs != NULL) && locs->is_call()) {
596 is_leaf_ = false; 595 is_leaf_ = false;
597 return; 596 return;
598 } 597 }
599 } 598 }
600 } 599 }
601 } 600 }
602 601
603 } // namespace dart 602 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698