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

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

Issue 1284893002: Reland: [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stac… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/raw-machine-assembler.cc ('k') | src/compiler/register-allocator-verifier.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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 UnallocatedOperand* operand, int pos, bool is_tagged) { 1235 UnallocatedOperand* operand, int pos, bool is_tagged) {
1236 TRACE("Allocating fixed reg for op %d\n", operand->virtual_register()); 1236 TRACE("Allocating fixed reg for op %d\n", operand->virtual_register());
1237 DCHECK(operand->HasFixedPolicy()); 1237 DCHECK(operand->HasFixedPolicy());
1238 InstructionOperand allocated; 1238 InstructionOperand allocated;
1239 MachineType machine_type = InstructionSequence::DefaultRepresentation(); 1239 MachineType machine_type = InstructionSequence::DefaultRepresentation();
1240 int virtual_register = operand->virtual_register(); 1240 int virtual_register = operand->virtual_register();
1241 if (virtual_register != InstructionOperand::kInvalidVirtualRegister) { 1241 if (virtual_register != InstructionOperand::kInvalidVirtualRegister) {
1242 machine_type = data()->MachineTypeFor(virtual_register); 1242 machine_type = data()->MachineTypeFor(virtual_register);
1243 } 1243 }
1244 if (operand->HasFixedSlotPolicy()) { 1244 if (operand->HasFixedSlotPolicy()) {
1245 allocated = AllocatedOperand(AllocatedOperand::STACK_SLOT, machine_type, 1245 AllocatedOperand::AllocatedKind kind =
1246 operand->fixed_slot_index()); 1246 IsFloatingPoint(machine_type) ? AllocatedOperand::DOUBLE_STACK_SLOT
1247 : AllocatedOperand::STACK_SLOT;
1248 allocated =
1249 AllocatedOperand(kind, machine_type, operand->fixed_slot_index());
1247 } else if (operand->HasFixedRegisterPolicy()) { 1250 } else if (operand->HasFixedRegisterPolicy()) {
1248 allocated = AllocatedOperand(AllocatedOperand::REGISTER, machine_type, 1251 allocated = AllocatedOperand(AllocatedOperand::REGISTER, machine_type,
1249 operand->fixed_register_index()); 1252 operand->fixed_register_index());
1250 } else if (operand->HasFixedDoubleRegisterPolicy()) { 1253 } else if (operand->HasFixedDoubleRegisterPolicy()) {
1251 DCHECK_NE(InstructionOperand::kInvalidVirtualRegister, virtual_register); 1254 DCHECK_NE(InstructionOperand::kInvalidVirtualRegister, virtual_register);
1252 allocated = AllocatedOperand(AllocatedOperand::DOUBLE_REGISTER, 1255 allocated = AllocatedOperand(AllocatedOperand::DOUBLE_REGISTER,
1253 machine_type, operand->fixed_register_index()); 1256 machine_type, operand->fixed_register_index());
1254 } else { 1257 } else {
1255 UNREACHABLE(); 1258 UNREACHABLE();
1256 } 1259 }
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
3053 auto eliminate = moves->PrepareInsertAfter(move); 3056 auto eliminate = moves->PrepareInsertAfter(move);
3054 to_insert.push_back(move); 3057 to_insert.push_back(move);
3055 if (eliminate != nullptr) to_eliminate.push_back(eliminate); 3058 if (eliminate != nullptr) to_eliminate.push_back(eliminate);
3056 } 3059 }
3057 } 3060 }
3058 3061
3059 3062
3060 } // namespace compiler 3063 } // namespace compiler
3061 } // namespace internal 3064 } // namespace internal
3062 } // namespace v8 3065 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | src/compiler/register-allocator-verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698