| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/move-optimizer.h" | 5 #include "src/compiler/move-optimizer.h" |
| 6 | 6 |
| 7 namespace v8 { | 7 namespace v8 { |
| 8 namespace internal { | 8 namespace internal { |
| 9 namespace compiler { | 9 namespace compiler { |
| 10 | 10 |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 if (!gap_initialized) { | 417 if (!gap_initialized) { |
| 418 CompressMoves(instr->parallel_moves()[0], instr->parallel_moves()[1]); | 418 CompressMoves(instr->parallel_moves()[0], instr->parallel_moves()[1]); |
| 419 } | 419 } |
| 420 CompressBlock(block); | 420 CompressBlock(block); |
| 421 } | 421 } |
| 422 | 422 |
| 423 | 423 |
| 424 namespace { | 424 namespace { |
| 425 | 425 |
| 426 bool IsSlot(const InstructionOperand& op) { | 426 bool IsSlot(const InstructionOperand& op) { |
| 427 return op.IsStackSlot() || op.IsDoubleStackSlot(); | 427 return op.IsStackSlot() || op.IsFPStackSlot(); |
| 428 } | 428 } |
| 429 | 429 |
| 430 | 430 |
| 431 bool LoadCompare(const MoveOperands* a, const MoveOperands* b) { | 431 bool LoadCompare(const MoveOperands* a, const MoveOperands* b) { |
| 432 if (!a->source().EqualsCanonicalized(b->source())) { | 432 if (!a->source().EqualsCanonicalized(b->source())) { |
| 433 return a->source().CompareCanonicalized(b->source()); | 433 return a->source().CompareCanonicalized(b->source()); |
| 434 } | 434 } |
| 435 if (IsSlot(a->destination()) && !IsSlot(b->destination())) return false; | 435 if (IsSlot(a->destination()) && !IsSlot(b->destination())) return false; |
| 436 if (!IsSlot(a->destination()) && IsSlot(b->destination())) return true; | 436 if (!IsSlot(a->destination()) && IsSlot(b->destination())) return true; |
| 437 return a->destination().CompareCanonicalized(b->destination()); | 437 return a->destination().CompareCanonicalized(b->destination()); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 static_cast<Instruction::GapPosition>(1), code_zone()); | 474 static_cast<Instruction::GapPosition>(1), code_zone()); |
| 475 slot_1->AddMove(group_begin->destination(), load->destination()); | 475 slot_1->AddMove(group_begin->destination(), load->destination()); |
| 476 load->Eliminate(); | 476 load->Eliminate(); |
| 477 } | 477 } |
| 478 loads.clear(); | 478 loads.clear(); |
| 479 } | 479 } |
| 480 | 480 |
| 481 } // namespace compiler | 481 } // namespace compiler |
| 482 } // namespace internal | 482 } // namespace internal |
| 483 } // namespace v8 | 483 } // namespace v8 |
| OLD | NEW |