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

Unified Diff: src/compiler/instruction.h

Issue 785993002: [turbofan] delay inserting spill slots for parent ranges. (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 | « no previous file | src/compiler/instruction.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 9a5b87d63801bc6f54209c74faa1cbd6ff75cb77..9e2004fa88bc5cad6aad1013773092b2f02d565e 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -39,7 +39,6 @@ const InstructionCode kSourcePositionInstruction = -3;
class InstructionOperand : public ZoneObject {
public:
enum Kind {
- INVALID,
UNALLOCATED,
CONSTANT,
IMMEDIATE,
@@ -49,7 +48,6 @@ class InstructionOperand : public ZoneObject {
DOUBLE_REGISTER
};
- InstructionOperand() : value_(KindField::encode(INVALID)) {}
InstructionOperand(Kind kind, int index) { ConvertTo(kind, index); }
Kind kind() const { return KindField::decode(value_); }
@@ -58,7 +56,6 @@ class InstructionOperand : public ZoneObject {
bool Is##name() const { return kind() == type; }
INSTRUCTION_OPERAND_LIST(INSTRUCTION_OPERAND_PREDICATE)
INSTRUCTION_OPERAND_PREDICATE(Unallocated, UNALLOCATED, 0)
- INSTRUCTION_OPERAND_PREDICATE(Ignored, INVALID, 0)
#undef INSTRUCTION_OPERAND_PREDICATE
bool Equals(const InstructionOperand* other) const {
return value_ == other->value_;
@@ -291,16 +288,12 @@ class MoveOperands FINAL {
}
// A move is redundant if it's been eliminated, if its source and
- // destination are the same, or if its destination is unneeded or constant.
+ // destination are the same, or if its destination is constant.
bool IsRedundant() const {
- return IsEliminated() || source_->Equals(destination_) || IsIgnored() ||
+ return IsEliminated() || source_->Equals(destination_) ||
(destination_ != NULL && destination_->IsConstant());
}
- bool IsIgnored() const {
- return destination_ != NULL && destination_->IsIgnored();
- }
-
// We clear both operands to indicate move that's been eliminated.
void Eliminate() { source_ = destination_ = NULL; }
bool IsEliminated() const {
@@ -348,7 +341,7 @@ class SubKindOperand FINAL : public InstructionOperand {
private:
static SubKindOperand* cache;
- SubKindOperand() : InstructionOperand() {}
+ SubKindOperand() : InstructionOperand(kOperandKind, 0) {} // For the caches.
explicit SubKindOperand(int index)
: InstructionOperand(kOperandKind, index) {}
};
« no previous file with comments | « no previous file | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698