summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes_vector.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2017-07-08 12:34:55 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2017-07-08 12:34:55 +0000
commit9858bf70c9af425f5f712caca7b51b49c806b271 (patch)
treee70e88c83c8260fbea01b258d3d221cc31d38d8d /compiler/optimizing/nodes_vector.h
parenta79f0b5deb932aa44e227c94c4ad09082b3ab4c7 (diff)
Revert "Added GVN related attributes to vector nodes."
Fails armv8 checker tests. This reverts commit a79f0b5deb932aa44e227c94c4ad09082b3ab4c7. Change-Id: I8913743f241febbbb24c0662af76397e87e59cd1
Diffstat (limited to 'compiler/optimizing/nodes_vector.h')
-rw-r--r--compiler/optimizing/nodes_vector.h50
1 files changed, 4 insertions, 46 deletions
diff --git a/compiler/optimizing/nodes_vector.h b/compiler/optimizing/nodes_vector.h
index dc522a463e..5dbe29b4fa 100644
--- a/compiler/optimizing/nodes_vector.h
+++ b/compiler/optimizing/nodes_vector.h
@@ -46,10 +46,6 @@ class Alignment {
return "ALIGN(" + std::to_string(base_) + "," + std::to_string(offset_) + ")";
}
- bool operator==(const Alignment& other) const {
- return base_ == other.base_ && offset_ == other.offset_;
- }
-
private:
size_t base_;
size_t offset_;
@@ -100,13 +96,6 @@ class HVecOperation : public HVariableInputSizeInstruction {
return GetPackedField<TypeField>();
}
- bool CanBeMoved() const OVERRIDE { return true; }
-
- bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
- const HVecOperation* o = other->AsVecOperation();
- return GetVectorLength() == o->GetVectorLength() && GetPackedType() == o->GetPackedType();
- }
-
DECLARE_ABSTRACT_INSTRUCTION(VecOperation);
protected:
@@ -200,11 +189,6 @@ class HVecMemoryOperation : public HVecOperation {
HInstruction* GetArray() const { return InputAt(0); }
HInstruction* GetIndex() const { return InputAt(1); }
- bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
- const HVecMemoryOperation* o = other->AsVecMemoryOperation();
- return HVecOperation::InstructionDataEquals(o) && GetAlignment() == o->GetAlignment();
- }
-
DECLARE_ABSTRACT_INSTRUCTION(VecMemoryOperation);
private:
@@ -394,13 +378,6 @@ class HVecHalvingAdd FINAL : public HVecBinaryOperation {
bool IsUnsigned() const { return GetPackedFlag<kFieldHAddIsUnsigned>(); }
bool IsRounded() const { return GetPackedFlag<kFieldHAddIsRounded>(); }
- bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
- const HVecHalvingAdd* o = other->AsVecHalvingAdd();
- return HVecOperation::InstructionDataEquals(o) &&
- IsUnsigned() == o->IsUnsigned() &&
- IsRounded() == o->IsRounded();
- }
-
DECLARE_INSTRUCTION(VecHalvingAdd);
private:
@@ -489,11 +466,6 @@ class HVecMin FINAL : public HVecBinaryOperation {
bool IsUnsigned() const { return GetPackedFlag<kFieldMinOpIsUnsigned>(); }
- bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
- const HVecMin* o = other->AsVecMin();
- return HVecOperation::InstructionDataEquals(o) && IsUnsigned() == o->IsUnsigned();
- }
-
DECLARE_INSTRUCTION(VecMin);
private:
@@ -524,11 +496,6 @@ class HVecMax FINAL : public HVecBinaryOperation {
bool IsUnsigned() const { return GetPackedFlag<kFieldMaxOpIsUnsigned>(); }
- bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
- const HVecMax* o = other->AsVecMax();
- return HVecOperation::InstructionDataEquals(o) && IsUnsigned() == o->IsUnsigned();
- }
-
DECLARE_INSTRUCTION(VecMax);
private:
@@ -727,9 +694,10 @@ class HVecMultiplyAccumulate FINAL : public HVecOperation {
static constexpr int kInputMulLeftIndex = 1;
static constexpr int kInputMulRightIndex = 2;
+ bool CanBeMoved() const OVERRIDE { return true; }
+
bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
- const HVecMultiplyAccumulate* o = other->AsVecMultiplyAccumulate();
- return HVecOperation::InstructionDataEquals(o) && GetOpKind() == o->GetOpKind();
+ return op_kind_ == other->AsVecMultiplyAccumulate()->op_kind_;
}
InstructionKind GetOpKind() const { return op_kind_; }
@@ -764,16 +732,10 @@ class HVecLoad FINAL : public HVecMemoryOperation {
SetRawInputAt(1, index);
SetPackedFlag<kFieldIsStringCharAt>(is_string_char_at);
}
+ DECLARE_INSTRUCTION(VecLoad);
bool IsStringCharAt() const { return GetPackedFlag<kFieldIsStringCharAt>(); }
- bool InstructionDataEquals(const HInstruction* other) const OVERRIDE {
- const HVecLoad* o = other->AsVecLoad();
- return HVecMemoryOperation::InstructionDataEquals(o) && IsStringCharAt() == o->IsStringCharAt();
- }
-
- DECLARE_INSTRUCTION(VecLoad);
-
private:
// Additional packed bits.
static constexpr size_t kFieldIsStringCharAt = HVecOperation::kNumberOfVectorOpPackedBits;
@@ -805,11 +767,7 @@ class HVecStore FINAL : public HVecMemoryOperation {
SetRawInputAt(1, index);
SetRawInputAt(2, value);
}
-
- bool CanBeMoved() const OVERRIDE { return false; }
-
DECLARE_INSTRUCTION(VecStore);
-
private:
DISALLOW_COPY_AND_ASSIGN(HVecStore);
};