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

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

Issue 2124023003: [turbofan] Add MachineType to LinkageLocation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/linkage.h » ('j') | 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 bd31c677189693ac01edef160352d3c94432e86d..616b6a53810cf02bbbd68f16b585e24c884edd5a 100644
--- a/src/compiler/instruction-selector-impl.h
+++ b/src/compiler/instruction-selector-impl.h
@@ -68,9 +68,8 @@ class OperandGenerator {
return ConstantOperand(virtual_register);
}
- InstructionOperand DefineAsLocation(Node* node, LinkageLocation location,
- MachineRepresentation rep) {
- return Define(node, ToUnallocatedOperand(location, rep, GetVReg(node)));
+ InstructionOperand DefineAsLocation(Node* node, LinkageLocation location) {
+ return Define(node, ToUnallocatedOperand(location, GetVReg(node)));
}
InstructionOperand DefineAsDualLocation(Node* node,
@@ -144,20 +143,18 @@ class OperandGenerator {
return sequence()->AddImmediate(ToConstant(node));
}
- InstructionOperand UseLocation(Node* node, LinkageLocation location,
- MachineRepresentation rep) {
- return Use(node, ToUnallocatedOperand(location, rep, GetVReg(node)));
+ InstructionOperand UseLocation(Node* node, LinkageLocation location) {
+ return Use(node, ToUnallocatedOperand(location, GetVReg(node)));
}
// Used to force gap moves from the from_location to the to_location
// immediately before an instruction.
InstructionOperand UsePointerLocation(LinkageLocation to_location,
LinkageLocation from_location) {
- MachineRepresentation rep = MachineType::PointerRepresentation();
UnallocatedOperand casted_from_operand =
- UnallocatedOperand::cast(TempLocation(from_location, rep));
+ UnallocatedOperand::cast(TempLocation(from_location));
selector_->Emit(kArchNop, casted_from_operand);
- return ToUnallocatedOperand(to_location, rep,
+ return ToUnallocatedOperand(to_location,
casted_from_operand.virtual_register());
}
@@ -185,10 +182,8 @@ class OperandGenerator {
return sequence()->AddImmediate(Constant(imm));
}
- InstructionOperand TempLocation(LinkageLocation location,
- MachineRepresentation rep) {
- return ToUnallocatedOperand(location, rep,
- sequence()->NextVirtualRegister());
+ InstructionOperand TempLocation(LinkageLocation location) {
+ return ToUnallocatedOperand(location, sequence()->NextVirtualRegister());
}
InstructionOperand Label(BasicBlock* block) {
@@ -257,7 +252,6 @@ class OperandGenerator {
}
UnallocatedOperand ToUnallocatedOperand(LinkageLocation location,
- MachineRepresentation rep,
int virtual_register) {
if (location.IsAnyRegister()) {
// any machine register.
@@ -275,7 +269,7 @@ class OperandGenerator {
location.AsCalleeFrameSlot(), virtual_register);
}
// a fixed register.
- if (IsFloatingPoint(rep)) {
+ if (IsFloatingPoint(location.GetType().representation())) {
return UnallocatedOperand(UnallocatedOperand::FIXED_FP_REGISTER,
location.AsRegister(), virtual_register);
}
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698