[PATCH] D98509: [LV] Calculate max feasible scalable VF.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 31 02:16:41 PDT 2021
fhahn added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:933
+ /// i.e. the maximum number of N x elt bits in <vscale x N x elt>.
+ unsigned getMaxScalableBitsPerBlock() const;
+
----------------
This is not needed any longer, right?
================
Comment at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:138
+ bool IsForcedScalable = (Scalable.Value == LoopVectorizeHints::FK_Enabled);
+ return Width.Value == 0 && IsForcedScalable;
+ }
----------------
david-arm wrote:
> Hi @sdesmalen, to be honest I'm not sure I fully understand this. If the user has set the pragma:
>
> #pragma clang loop vectorize_width(4, scalable)
>
> then haven't they also explicitly disabled fixed width? Maybe it's just the name of the function that confuses me a little, since from the user's perspective it feels like
>
> #pragma clang loop vectorize_width(4, scalable)
>
> and
>
> #pragma clang loop vectorize_width(scalable)
>
> are both disabling fixed width. I thought they were both hints that can be dropped by the compiler if necessary?
Would it be possible to decouple the change to compute the max VFs from the ones adding a new option & tweaking the handling here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98509/new/
https://reviews.llvm.org/D98509
More information about the llvm-commits
mailing list