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

Unified Diff: src/compiler/instruction.cc

Issue 889843003: [turbofan] Don't allocate UnallocatedOperands in Zone memory during instruction selection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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.h ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.cc
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc
index 6c358fb9c0f9435374fb501214a03cd3a392fa83..9ec2fb9c977134d983118daafa9e7cb742382902 100644
--- a/src/compiler/instruction.cc
+++ b/src/compiler/instruction.cc
@@ -119,16 +119,6 @@ bool ParallelMove::IsRedundant() const {
}
-static void SetOperand(UnallocatedOperand* loc, InstructionOperand* value) {
- if (value->IsUnallocated()) {
- loc[0] = *UnallocatedOperand::cast(value);
- } else {
- InstructionOperand* casted = static_cast<InstructionOperand*>(loc);
- casted[0] = *value;
- }
-}
-
-
Instruction::Instruction(InstructionCode opcode)
: opcode_(opcode),
bit_field_(OutputCountField::encode(0) | InputCountField::encode(0) |
@@ -138,9 +128,9 @@ Instruction::Instruction(InstructionCode opcode)
Instruction::Instruction(InstructionCode opcode, size_t output_count,
- InstructionOperand** outputs, size_t input_count,
- InstructionOperand** inputs, size_t temp_count,
- InstructionOperand** temps)
+ InstructionOperand* outputs, size_t input_count,
+ InstructionOperand* inputs, size_t temp_count,
+ InstructionOperand* temps)
: opcode_(opcode),
bit_field_(OutputCountField::encode(output_count) |
InputCountField::encode(input_count) |
@@ -149,13 +139,16 @@ Instruction::Instruction(InstructionCode opcode, size_t output_count,
pointer_map_(NULL) {
size_t offset = 0;
for (size_t i = 0; i < output_count; ++i) {
- SetOperand(&operands_[offset++], outputs[i]);
+ DCHECK(!outputs[i].IsInvalid());
+ operands_[offset++] = outputs[i];
}
for (size_t i = 0; i < input_count; ++i) {
- SetOperand(&operands_[offset++], inputs[i]);
+ DCHECK(!inputs[i].IsInvalid());
+ operands_[offset++] = inputs[i];
}
for (size_t i = 0; i < temp_count; ++i) {
- SetOperand(&operands_[offset++], temps[i]);
+ DCHECK(!temps[i].IsInvalid());
+ operands_[offset++] = temps[i];
}
}
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698