[fpc-devel] Vectorisation, optimisation etc.

Ben Grasset operator97 at gmail.com
Sat Apr 6 23:13:58 CEST 2019


On Wed, Mar 27, 2019 at 11:32 AM J. Gareth Moreton <
gareth at moreton-family.com> wrote:

> So with the false start that was pure inline assembly, I like to talk
> about how to move forward with FPC, or at least with x86_64.
>

It occurred to me today, aren't you the person who fixed the -Sv compiler
flag so that it actually works? I'd say expansion on that functionality
would be more widely useful than just about anything else I can think of
with regards to optimization (because it's so easy to use, and yet so
powerful.)

Maybe start with making it fully use AVX instructions for the operations?
IIRC, currently, even if you use the AVX or AVX2 compiler flags, it will
always generate stuff like this:

vmovups (%rdx),%xmm0
addps (%r8),%xmm0
vmovups %xmm0,(%rax)

rather than using vaddps.

>From there you could make it support arrays larger than 4 elements,
e.t.c....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190406/7db85836/attachment.html>


More information about the fpc-devel mailing list