[SVE] Remove TypeSize comparison operators
authorDavid Sherwood <david.sherwood@arm.com>
Mon, 26 Oct 2020 15:12:58 +0000 (15:12 +0000)
committerDavid Sherwood <david.sherwood@arm.com>
Thu, 29 Oct 2020 14:32:26 +0000 (14:32 +0000)
All known instances in the code where we relied upon the TypeSize
comparison operators have now been changed to either use scalar
interger comparisons or one of the TypeSize::isKnownXY functions.
It is now safe to remove the comparison operators.

Differential Revision: https://reviews.llvm.org/D90160

llvm/include/llvm/Support/TypeSize.h

index 47fb90d..392dd1a 100644 (file)
@@ -206,25 +206,6 @@ public:
   uint64_t getFixedSize() const { return getFixedValue(); }
   uint64_t getKnownMinSize() const { return getKnownMinValue(); }
 
-  friend bool operator<(const TypeSize &LHS, const TypeSize &RHS) {
-    assert(LHS.IsScalable == RHS.IsScalable &&
-           "Ordering comparison of scalable and fixed types");
-
-    return LHS.MinVal < RHS.MinVal;
-  }
-
-  friend bool operator>(const TypeSize &LHS, const TypeSize &RHS) {
-    return RHS < LHS;
-  }
-
-  friend bool operator<=(const TypeSize &LHS, const TypeSize &RHS) {
-    return !(RHS < LHS);
-  }
-
-  friend bool operator>=(const TypeSize &LHS, const TypeSize& RHS) {
-    return !(LHS < RHS);
-  }
-
   TypeSize &operator-=(TypeSize RHS) {
     assert(IsScalable == RHS.IsScalable &&
            "Subtraction using mixed scalable and fixed types");