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

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

Issue 10802025: Fuse compare with branch at graph building time. (Closed) Base URL: http://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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 } 469 }
470 } 470 }
471 471
472 472
473 void FlowGraphCompiler::EmitDoubleCompareBranch(Condition true_condition, 473 void FlowGraphCompiler::EmitDoubleCompareBranch(Condition true_condition,
474 XmmRegister left, 474 XmmRegister left,
475 XmmRegister right, 475 XmmRegister right,
476 BranchInstr* branch) { 476 BranchInstr* branch) {
477 ASSERT(branch != NULL); 477 ASSERT(branch != NULL);
478 assembler()->comisd(left, right); 478 assembler()->comisd(left, right);
479 BlockEntryInstr* nan_result = branch->is_negated() ? 479 BlockEntryInstr* nan_result = (true_condition == NOT_EQUAL) ?
480 branch->true_successor() : branch->false_successor(); 480 branch->true_successor() : branch->false_successor();
481 assembler()->j(PARITY_EVEN, GetBlockLabel(nan_result)); 481 assembler()->j(PARITY_EVEN, GetBlockLabel(nan_result));
482 branch->EmitBranchOnCondition(this, true_condition); 482 branch->EmitBranchOnCondition(this, true_condition);
483 } 483 }
484 484
485 485
486 486
487 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition, 487 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition,
488 XmmRegister left, 488 XmmRegister left,
489 XmmRegister right, 489 XmmRegister right,
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 return; 793 return;
794 } 794 }
795 } 795 }
796 796
797 // This move is not blocked. 797 // This move is not blocked.
798 EmitMove(index); 798 EmitMove(index);
799 } 799 }
800 800
801 801
802 } // namespace dart 802 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698