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

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

Issue 10698153: Change comparison-to-branch fusion to actually remove comparison from the 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
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/il_printer.h" 5 #include "vm/il_printer.h"
6 6
7 #include "vm/intermediate_language.h" 7 #include "vm/intermediate_language.h"
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 f->Print(" %s ", DebugName()); 396 f->Print(" %s ", DebugName());
397 exception()->PrintTo(f); 397 exception()->PrintTo(f);
398 f->Print(", "); 398 f->Print(", ");
399 stack_trace()->PrintTo(f); 399 stack_trace()->PrintTo(f);
400 } 400 }
401 401
402 402
403 void BranchInstr::PrintTo(BufferFormatter* f) const { 403 void BranchInstr::PrintTo(BufferFormatter* f) const {
404 f->Print(" %s ", DebugName()); 404 f->Print(" %s ", DebugName());
405 f->Print("if "); 405 f->Print("if ");
406 value()->PrintTo(f);
407 if (is_fused_with_comparison()) { 406 if (is_fused_with_comparison()) {
408 f->Print(" (fused)"); 407 if (is_negated()) f->Print(" not ");
408 fused_with_comparison_->PrintTo(f);
409 } else {
410 value()->PrintTo(f);
409 } 411 }
410 if (is_negated()) { 412
411 f->Print(" (negated)");
412 }
413 f->Print(" goto (%d, %d)", 413 f->Print(" goto (%d, %d)",
414 true_successor()->block_id(), 414 true_successor()->block_id(),
415 false_successor()->block_id()); 415 false_successor()->block_id());
416 } 416 }
417 417
418 418
419 void ParallelMoveInstr::PrintTo(BufferFormatter* f) const { 419 void ParallelMoveInstr::PrintTo(BufferFormatter* f) const {
420 UNIMPLEMENTED(); 420 UNIMPLEMENTED();
421 } 421 }
422 422
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 void Environment::PrintTo(BufferFormatter* f) const { 665 void Environment::PrintTo(BufferFormatter* f) const {
666 f->Print(" env={ "); 666 f->Print(" env={ ");
667 for (intptr_t i = 0; i < values_.length(); ++i) { 667 for (intptr_t i = 0; i < values_.length(); ++i) {
668 if (i > 0) f->Print(", "); 668 if (i > 0) f->Print(", ");
669 values_[i]->PrintTo(f); 669 values_[i]->PrintTo(f);
670 } 670 }
671 f->Print(" }"); 671 f->Print(" }");
672 } 672 }
673 673
674 } // namespace dart 674 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698