[PATCH] D88409: [SVE] Make ElementCount and TypeSize use a new PolySize class

Vineet Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 07:56:39 PDT 2020


vkmr added inline comments.


================
Comment at: llvm/include/llvm/Support/TypeSize.h:45
   }
 
   /// Counting predicates.
----------------
It might be useful to add an explicit `getNone()` (or `getZero()`) function that simply returns `{0, false}` value. For instance, there are places using `Optional<ElementCount>`for VF  (and `Optional<unsigned>` where VF is not yet ported to `ElementCount`) and use `None` to represent VectorizationFailure.  We already have `isZero()` and `isNonZero()` functions so a Zero getter should not be out of tune.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88409



More information about the llvm-commits mailing list