Index: src/compiler/instruction.h |
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h |
index c6a3d6df0c6bae04f664d43fe5df9704fe4b8410..a27b07bf6353b8d031d83bd7b236cea0c9d10a51 100644 |
--- a/src/compiler/instruction.h |
+++ b/src/compiler/instruction.h |
@@ -117,7 +117,7 @@ class InstructionOperand { |
return this->GetCanonicalizedValue() < that.GetCanonicalizedValue(); |
} |
- bool InterferesWith(const InstructionOperand& that) const; |
+ bool InterferesWith(const InstructionOperand& other) const; |
// APIs to aid debugging. For general-stream APIs, use operator<< |
void Print(const RegisterConfiguration* config) const; |
@@ -639,8 +639,14 @@ uint64_t InstructionOperand::GetCanonicalizedValue() const { |
if (IsAnyLocationOperand()) { |
MachineRepresentation canonical = MachineRepresentation::kNone; |
if (IsFPRegister()) { |
- // We treat all FP register operands the same for simple aliasing. |
- canonical = MachineRepresentation::kFloat64; |
+ if (kSimpleFPAliasing) { |
+ // We treat all FP register operands the same for simple aliasing. |
+ canonical = MachineRepresentation::kFloat64; |
+ } else { |
+ // We need to distinguish FP register operands of different reps when |
+ // aliasing is not simple (e.g. ARM). |
+ canonical = LocationOperand::cast(this)->representation(); |
+ } |
} |
return InstructionOperand::KindField::update( |
LocationOperand::RepresentationField::update(this->value_, canonical), |
@@ -683,11 +689,6 @@ class MoveOperands final : public ZoneObject { |
} |
void SetPending() { destination_ = InstructionOperand(); } |
- // True if this move is a move into the given destination operand. |
- bool Blocks(const InstructionOperand& destination) const { |
- return !IsEliminated() && source().InterferesWith(destination); |
- } |
- |
// A move is redundant if it's been eliminated or if its source and |
// destination are the same. |
bool IsRedundant() const { |
@@ -746,9 +747,10 @@ class ParallelMove final : public ZoneVector<MoveOperands*>, public ZoneObject { |
bool IsRedundant() const; |
// Prepare this ParallelMove to insert move as if it happened in a subsequent |
- // ParallelMove. move->source() may be changed. The MoveOperand returned |
- // must be Eliminated. |
- MoveOperands* PrepareInsertAfter(MoveOperands* move) const; |
+ // ParallelMove. move->source() may be changed. Any MoveOperands added to |
+ // to_eliminate must be Eliminated. |
+ void PrepareInsertAfter(MoveOperands* move, |
+ ZoneVector<MoveOperands*>* to_eliminate) const; |
private: |
DISALLOW_COPY_AND_ASSIGN(ParallelMove); |