Chromium Code Reviews| Index: src/compiler/instruction.h |
| diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h |
| index 687b1b8761312c5ee50ea3804337bfd63d455a36..fbedd1e74416d7afcb28dea3c227ed0ac393a4a9 100644 |
| --- a/src/compiler/instruction.h |
| +++ b/src/compiler/instruction.h |
| @@ -28,8 +28,7 @@ namespace compiler { |
| // Forward declarations. |
| class Schedule; |
| - |
| -class InstructionOperand { |
| +class V8_EXPORT_PRIVATE InstructionOperand { |
| public: |
| static const int kInvalidVirtualRegister = -1; |
| @@ -119,7 +118,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; |
| @@ -641,8 +640,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), |
| @@ -659,8 +664,7 @@ struct CompareOperandModuloType { |
| } |
| }; |
| - |
| -class MoveOperands final : public ZoneObject { |
| +class V8_EXPORT_PRIVATE MoveOperands final : public ZoneObject { |
|
jochen (gone - plz use gerrit)
2016/10/25 11:56:07
if you export a class, you have to annotated unexp
bbudge
2016/10/25 14:01:09
Done. Here and below.
|
| public: |
| MoveOperands(const InstructionOperand& source, |
| const InstructionOperand& destination) |
| @@ -685,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 { |
| @@ -724,8 +723,8 @@ struct PrintableMoveOperands { |
| std::ostream& operator<<(std::ostream& os, const PrintableMoveOperands& mo); |
| - |
| -class ParallelMove final : public ZoneVector<MoveOperands*>, public ZoneObject { |
| +class V8_EXPORT_PRIVATE ParallelMove final : public ZoneVector<MoveOperands *>, |
|
jochen (gone - plz use gerrit)
2016/10/25 11:56:07
ZoneVector<T> is implemented as std::vector<T, zon
bbudge
2016/10/25 14:01:09
I stumbled on that fix in patchset #22 (adding a d
|
| + public ZoneObject { |
| public: |
| explicit ParallelMove(Zone* zone) : ZoneVector<MoveOperands*>(zone) { |
| reserve(4); |
| @@ -748,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); |