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

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

Issue 2082263002: [turbofan]: Support using push instructions for setting up tail call parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comments Created 4 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
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('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 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Elide moves made redundant by the instruction. 138 // Elide moves made redundant by the instruction.
139 for (MoveOperands* move : *moves) { 139 for (MoveOperands* move : *moves) {
140 if (outputs.find(move->destination()) != outputs.end() && 140 if (outputs.find(move->destination()) != outputs.end() &&
141 inputs.find(move->destination()) == inputs.end()) { 141 inputs.find(move->destination()) == inputs.end()) {
142 move->Eliminate(); 142 move->Eliminate();
143 } 143 }
144 } 144 }
145 145
146 // The ret instruction makes any assignment before it unnecessary, except for 146 // The ret instruction makes any assignment before it unnecessary, except for
147 // the one for its input. 147 // the one for its input.
148 if (instruction->opcode() == ArchOpcode::kArchRet) { 148 if (instruction->IsRet() || instruction->IsTailCall()) {
149 for (MoveOperands* move : *moves) { 149 for (MoveOperands* move : *moves) {
150 if (inputs.find(move->destination()) == inputs.end()) { 150 if (inputs.find(move->destination()) == inputs.end()) {
151 move->Eliminate(); 151 move->Eliminate();
152 } 152 }
153 } 153 }
154 } 154 }
155 } 155 }
156 156
157 void MoveOptimizer::MigrateMoves(Instruction* to, Instruction* from) { 157 void MoveOptimizer::MigrateMoves(Instruction* to, Instruction* from) {
158 if (from->IsCall()) return; 158 if (from->IsCall()) return;
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 static_cast<Instruction::GapPosition>(1), code_zone()); 500 static_cast<Instruction::GapPosition>(1), code_zone());
501 slot_1->AddMove(group_begin->destination(), load->destination()); 501 slot_1->AddMove(group_begin->destination(), load->destination());
502 load->Eliminate(); 502 load->Eliminate();
503 } 503 }
504 loads.clear(); 504 loads.clear();
505 } 505 }
506 506
507 } // namespace compiler 507 } // namespace compiler
508 } // namespace internal 508 } // namespace internal
509 } // namespace v8 509 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698