[cfe-dev] Proposed changes to vectorize_width #pragma

Roger Ferrer Ibáñez via cfe-dev cfe-dev at lists.llvm.org
Mon Nov 30 05:33:55 PST 2020


Hi David,

Your proposal looks sensible to me. I understand that for reasons of
evolution of the pragma, you chose to give it `fixed` semantics if no
explicit mark of vectorisation style appears, right?

Is this something in the future we'd want to relax? This way the target
could also pick the best vectorization style (borrowing Sjoerd's
terminology here).
Perhaps we could define a `vectorize_style(any)` as well. That would be the
one used if no explicit `vectorize_style` is specified.


>
> As a further extension I’d also like to permit
> vectorize_width(fixed|scalable) to
>
> allow users to hint at the type of vector used without specifying the
>
> vectorisation factor. Examples of this would be:
>
>
>
>   // Vectorize the loop with <N x eltty> for a profitable N
>
>   #pragma clang loop vectorize_width(fixed)
>
>   // Vectorize the loop with <vscale x N x eltty> for a profitable N
>
>   #pragma clang loop vectorize_width(scalable)
>
In those cases, I imagine `vectorize_style` could be enough and we avoid
having a `vectorize_width` that doesn't actually tell us the width (or the
factor of the actual width, for scalables). But this falls in the
"aesthetics" category, I think.

Kind regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20201130/5421a108/attachment.html>


More information about the cfe-dev mailing list