On Tue, 4 Jun 2024, Andre Vieira (lists) wrote:

> Hi,
> 
> We got a question as to whether GCC had something similar to llvm's pragma
> clang loop interleave_count(N), see
> https://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-loop-hint-optimizations
> 
> I did a quick hack, using 'GCC interleaves N', just as a proof of concept, to
> see whether we could connect this to the suggested_unroll_factor in the
> vectorizer and to test the waters regarding having something like this
> upstream.
> 
> For the real thing I'd suggest we use the same pragma syntax as clang's so its
> easier to port code.  It is my understanding that the main use for this is for
> doing performance tuning of HPC kernels and performance tuning of CPU's cost
> models.
> 
> This seems to work (TM), though with the move to slp-only I guess this will
> stop working? Though I suspect we will want to have similar capabilities in
> SLP, or maybe we have already and I didn't look hard enough.

suggested-unroll-factor also works with SLP, at least I don't see a
reason why it should not.

> Also only implemented it for C and C++, have not looked at Fortran.
> 
> WDYT?
> 
> Kind regards,
> Andre

Reply via email to