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

Unified Diff: src/compiler/instruction.h

Issue 814043002: Revert of [turbofan] remove control field from instruction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index 5d5e6813a782c5de83df3467165ca75a88a5f8cf..48dbdf20e70fdd6bf9f8b83991edf6417ef8ca1c 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -454,7 +454,7 @@
return FlagsConditionField::decode(opcode());
}
- // TODO(titzer): make call into a flag.
+ // TODO(titzer): make control and call into flags.
static Instruction* New(Zone* zone, InstructionCode opcode) {
return New(zone, opcode, 0, NULL, 0, NULL, 0, NULL);
}
@@ -476,10 +476,17 @@
opcode, output_count, outputs, input_count, inputs, temp_count, temps);
}
+ // TODO(titzer): another holdover from lithium days; register allocator
+ // should not need to know about control instructions.
+ Instruction* MarkAsControl() {
+ bit_field_ = IsControlField::update(bit_field_, true);
+ return this;
+ }
Instruction* MarkAsCall() {
bit_field_ = IsCallField::update(bit_field_, true);
return this;
}
+ bool IsControl() const { return IsControlField::decode(bit_field_); }
bool IsCall() const { return IsCallField::decode(bit_field_); }
bool NeedsPointerMap() const { return IsCall(); }
bool HasPointerMap() const { return pointer_map_ != NULL; }
@@ -521,7 +528,8 @@
explicit Instruction(InstructionCode opcode)
: opcode_(opcode),
bit_field_(OutputCountField::encode(0) | InputCountField::encode(0) |
- TempCountField::encode(0) | IsCallField::encode(false)),
+ TempCountField::encode(0) | IsCallField::encode(false) |
+ IsControlField::encode(false)),
pointer_map_(NULL) {}
Instruction(InstructionCode opcode, size_t output_count,
@@ -532,7 +540,7 @@
bit_field_(OutputCountField::encode(output_count) |
InputCountField::encode(input_count) |
TempCountField::encode(temp_count) |
- IsCallField::encode(false)),
+ IsCallField::encode(false) | IsControlField::encode(false)),
pointer_map_(NULL) {
for (size_t i = 0; i < output_count; ++i) {
operands_[i] = outputs[i];
@@ -550,6 +558,7 @@
typedef BitField<size_t, 8, 16> InputCountField;
typedef BitField<size_t, 24, 6> TempCountField;
typedef BitField<bool, 30, 1> IsCallField;
+ typedef BitField<bool, 31, 1> IsControlField;
InstructionCode opcode_;
uint32_t bit_field_;
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698