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

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

Issue 10559072: Fuse Comparison->BooleanNegate->Branch. (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 | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.h » ('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/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 } 396 }
397 397
398 398
399 void BranchInstr::PrintTo(BufferFormatter* f) const { 399 void BranchInstr::PrintTo(BufferFormatter* f) const {
400 f->Print(" %s ", DebugName()); 400 f->Print(" %s ", DebugName());
401 f->Print("if "); 401 f->Print("if ");
402 value()->PrintTo(f); 402 value()->PrintTo(f);
403 if (is_fused_with_comparison()) { 403 if (is_fused_with_comparison()) {
404 f->Print(" (fused)"); 404 f->Print(" (fused)");
405 } 405 }
406 if (is_negated()) {
407 f->Print(" (negated)");
408 }
406 f->Print(" goto (%d, %d)", 409 f->Print(" goto (%d, %d)",
407 true_successor()->block_id(), 410 true_successor()->block_id(),
408 false_successor()->block_id()); 411 false_successor()->block_id());
409 } 412 }
410 413
411 414
412 void FlowGraphVisualizer::Print(const char* format, ...) { 415 void FlowGraphVisualizer::Print(const char* format, ...) {
413 char str[120]; 416 char str[120];
414 BufferFormatter f(str, sizeof(str)); 417 BufferFormatter f(str, sizeof(str));
415 f.Print("%*s", 2 * indent_, ""); 418 f.Print("%*s", 2 * indent_, "");
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 f->Print("_ %s ", DebugName()); 633 f->Print("_ %s ", DebugName());
631 f->Print("if "); 634 f->Print("if ");
632 value()->PrintTo(f); 635 value()->PrintTo(f);
633 f->Print(" goto (B%d, B%d)", 636 f->Print(" goto (B%d, B%d)",
634 true_successor()->block_id(), 637 true_successor()->block_id(),
635 false_successor()->block_id()); 638 false_successor()->block_id());
636 } 639 }
637 640
638 641
639 } // namespace dart 642 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698