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

Side by Side Diff: src/compiler/register-allocator.cc

Issue 1261923007: [turbofan] Unify referencing of stack slots (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 5 years, 4 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/pipeline.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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/linkage.h" 6 #include "src/compiler/linkage.h"
7 #include "src/compiler/register-allocator.h" 7 #include "src/compiler/register-allocator.h"
8 #include "src/string-stream.h" 8 #include "src/string-stream.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 bool assigned = false; 1360 bool assigned = false;
1361 if (first_output->HasFixedPolicy()) { 1361 if (first_output->HasFixedPolicy()) {
1362 int output_vreg = first_output->virtual_register(); 1362 int output_vreg = first_output->virtual_register();
1363 UnallocatedOperand output_copy(UnallocatedOperand::ANY, output_vreg); 1363 UnallocatedOperand output_copy(UnallocatedOperand::ANY, output_vreg);
1364 bool is_tagged = IsReference(output_vreg); 1364 bool is_tagged = IsReference(output_vreg);
1365 AllocateFixed(first_output, instr_index, is_tagged); 1365 AllocateFixed(first_output, instr_index, is_tagged);
1366 1366
1367 // This value is produced on the stack, we never need to spill it. 1367 // This value is produced on the stack, we never need to spill it.
1368 if (first_output->IsStackSlot()) { 1368 if (first_output->IsStackSlot()) {
1369 DCHECK(StackSlotOperand::cast(first_output)->index() < 1369 DCHECK(StackSlotOperand::cast(first_output)->index() <
1370 data()->frame()->GetSpillSlotCount()); 1370 data()->frame()->GetTotalFrameSlotCount());
1371 range->SetSpillOperand(StackSlotOperand::cast(first_output)); 1371 range->SetSpillOperand(StackSlotOperand::cast(first_output));
1372 range->SetSpillStartIndex(instr_index + 1); 1372 range->SetSpillStartIndex(instr_index + 1);
1373 assigned = true; 1373 assigned = true;
1374 } 1374 }
1375 data()->AddGapMove(instr_index + 1, Instruction::START, *first_output, 1375 data()->AddGapMove(instr_index + 1, Instruction::START, *first_output,
1376 output_copy); 1376 output_copy);
1377 } 1377 }
1378 // Make sure we add a gap move for spilling (if we have not done 1378 // Make sure we add a gap move for spilling (if we have not done
1379 // so already). 1379 // so already).
1380 if (!assigned) { 1380 if (!assigned) {
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after
3059 auto eliminate = moves->PrepareInsertAfter(move); 3059 auto eliminate = moves->PrepareInsertAfter(move);
3060 to_insert.push_back(move); 3060 to_insert.push_back(move);
3061 if (eliminate != nullptr) to_eliminate.push_back(eliminate); 3061 if (eliminate != nullptr) to_eliminate.push_back(eliminate);
3062 } 3062 }
3063 } 3063 }
3064 3064
3065 3065
3066 } // namespace compiler 3066 } // namespace compiler
3067 } // namespace internal 3067 } // namespace internal
3068 } // namespace v8 3068 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698