[PATCH] D88098: [SVE] Add new isKnownXX comparison functions to TypeSize

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 04:06:34 PDT 2020


paulwalker-arm accepted this revision.
paulwalker-arm added a comment.
This revision is now accepted and ready to land.

My preference would be to follow the clang-format advice for TypeSize.h.

Is there value is adding isKnownEQ just in case somebody wants to use function pointers?



================
Comment at: llvm/include/llvm/Support/TypeSize.h:200-205
+  static bool isKnownLE(const TypeSize &LHS, const TypeSize &RHS) {
+    if (!LHS.IsScalable || RHS.IsScalable) return LHS.MinSize <= RHS.MinSize;
+
+    // LHS.IsScalable = true, RHS.IsScalable = false
+    return false;
+  }
----------------
I'm happy with this but wondered if the following might reduce the complexity.
```
return isKnownLT(LHS, RHS) || isKnownEQ(LHS, RHS);
```



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88098/new/

https://reviews.llvm.org/D88098



More information about the llvm-commits mailing list