[PATCH] D90160: [SVE] Remove TypeSize comparison operators

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 08:24:37 PDT 2020


david-arm created this revision.
david-arm added reviewers: sdesmalen, ctetreau, c-rhodes.
Herald added subscribers: llvm-commits, psnobl, tschuett.
Herald added a reviewer: efriedma.
Herald added a project: LLVM.
david-arm requested review of this revision.

All known instances in the code where we relied upon the TypeSize
comparison operators have now been changed to either use scalar
integer comparisons or one of the TypeSize::isKnownXY functions.
It is now safe to remove the comparison operators.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90160

Files:
  llvm/include/llvm/Support/TypeSize.h


Index: llvm/include/llvm/Support/TypeSize.h
===================================================================
--- llvm/include/llvm/Support/TypeSize.h
+++ llvm/include/llvm/Support/TypeSize.h
@@ -206,25 +206,6 @@
   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");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90160.300681.patch
Type: text/x-patch
Size: 1026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201026/9b6ed83e/attachment.bin>


More information about the llvm-commits mailing list