[PATCH] D115651: [LV] Enable scalable vectorization by default for SVE cores.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 20 06:47:27 PST 2021


sdesmalen marked 3 inline comments as done.
sdesmalen added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1409
+  /// \return the preferred style of vectorization.
+  ScalableVectorizationKind getScalableVectorizationKind() const;
+
----------------
paulwalker-arm wrote:
> Now this interface has moving outside of `LoopVectorize` I'm not a fan of the name.  It looks weird for `getScalableVectorizationKind` to return `FixedWidthOnly`.
> 
> From a pure naming point go view perhaps just `getVectorizationKind`? But then the "kind" is really an expression of the order of things rather than being a specific thing.
> 
> Another alternative is to break the question up.  We already have `TTI.supportsScalableVectors()` so what about adding `TTI.useScalableVectorization()` and `TTI.preferScalableVectorization()`? Here I think the meaning is more instantly recognisable and it means you don't need to move the enum. What do you think?
I implemented this suggestion, but also removed `prefer`, so that `on` always implies `prefers scalable vectors`. That simplified the implementation quite a bit!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115651



More information about the llvm-commits mailing list