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

Side by Side Diff: src/compiler/move-optimizer.cc

Issue 2328423002: [Turbofan] Fix IsSlot function in MoveOptimizer. LOG=N BUG=v8:4124 (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698