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

Side by Side Diff: src/compiler/instruction-selector-impl.h

Issue 2650813003: [turbofan] Allow TempReg to be SameAsFirst and FromVreg (Closed)
Patch Set: Add DefineAsRegistertForVreg Created 3 years, 11 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 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
7 7
8 #include "src/compiler/instruction-selector.h" 8 #include "src/compiler/instruction-selector.h"
9 #include "src/compiler/instruction.h" 9 #include "src/compiler/instruction.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return ToUnallocatedOperand(to_location, 175 return ToUnallocatedOperand(to_location,
176 casted_from_operand.virtual_register()); 176 casted_from_operand.virtual_register());
177 } 177 }
178 178
179 InstructionOperand TempRegister() { 179 InstructionOperand TempRegister() {
180 return UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, 180 return UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER,
181 UnallocatedOperand::USED_AT_START, 181 UnallocatedOperand::USED_AT_START,
182 sequence()->NextVirtualRegister()); 182 sequence()->NextVirtualRegister());
183 } 183 }
184 184
185 int AllocateVirtualRegister() { return sequence()->NextVirtualRegister(); }
186
187 InstructionOperand DefineSameAsFirstForVreg(int vreg) {
188 return UnallocatedOperand(UnallocatedOperand::SAME_AS_FIRST_INPUT, vreg);
189 }
190
191 InstructionOperand DefineAsRegistertForVreg(int vreg) {
192 return UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, vreg);
193 }
194
195 InstructionOperand UseRegisterForVreg(int vreg) {
196 return UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER,
197 UnallocatedOperand::USED_AT_START, vreg);
198 }
199
185 InstructionOperand TempDoubleRegister() { 200 InstructionOperand TempDoubleRegister() {
186 UnallocatedOperand op = UnallocatedOperand( 201 UnallocatedOperand op = UnallocatedOperand(
187 UnallocatedOperand::MUST_HAVE_REGISTER, 202 UnallocatedOperand::MUST_HAVE_REGISTER,
188 UnallocatedOperand::USED_AT_START, sequence()->NextVirtualRegister()); 203 UnallocatedOperand::USED_AT_START, sequence()->NextVirtualRegister());
189 sequence()->MarkAsRepresentation(MachineRepresentation::kFloat64, 204 sequence()->MarkAsRepresentation(MachineRepresentation::kFloat64,
190 op.virtual_register()); 205 op.virtual_register());
191 return op; 206 return op;
192 } 207 }
193 208
194 InstructionOperand TempRegister(Register reg) { 209 InstructionOperand TempRegister(Register reg) {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch. 480 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch.
466 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch. 481 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch.
467 Runtime::FunctionId trap_id_; // Only valid if mode_ == kFlags_trap. 482 Runtime::FunctionId trap_id_; // Only valid if mode_ == kFlags_trap.
468 }; 483 };
469 484
470 } // namespace compiler 485 } // namespace compiler
471 } // namespace internal 486 } // namespace internal
472 } // namespace v8 487 } // namespace v8
473 488
474 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 489 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
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