Chromium Code Reviews

Unified Diff: src/compiler/instruction-selector-impl.h

Issue 2650813003: [turbofan] Allow TempReg to be SameAsFirst and FromVreg (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector-impl.h
diff --git a/src/compiler/instruction-selector-impl.h b/src/compiler/instruction-selector-impl.h
index 1b1fa12e6ea2e96741b1c065268d5fa32d77aae0..1a66ea3324b3f860b4b618ec3fa67e342f896526 100644
--- a/src/compiler/instruction-selector-impl.h
+++ b/src/compiler/instruction-selector-impl.h
@@ -182,6 +182,21 @@ class OperandGenerator {
sequence()->NextVirtualRegister());
}
+ InstructionOperand TempRegisterSameAsFirst() {
+ return UnallocatedOperand(UnallocatedOperand::SAME_AS_FIRST_INPUT,
+ sequence()->NextVirtualRegister());
+ }
+
+ InstructionOperand TempRegisterFromVreg(int vreg) {
+ return UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER,
+ UnallocatedOperand::USED_AT_START, vreg);
+ }
+
+ InstructionOperand TempRegisterFromVreg(InstructionOperand reg) {
+ return TempRegisterFromVreg(
+ UnallocatedOperand::cast(reg).virtual_register());
Jarin 2017/01/24 08:14:04 I am not a big fan of taking the vreg from one ope
john.yan 2017/01/24 15:07:30 That sounds better to me. Thanks.
+ }
+
InstructionOperand TempDoubleRegister() {
UnallocatedOperand op = UnallocatedOperand(
UnallocatedOperand::MUST_HAVE_REGISTER,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine