Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2023-11

Kit's current work

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

J. Gareth Moreton

Hi everyone,

I just thought I'd give a heads up on what I'm currently doing for the Free Pascal Compiler.

- Pure functions are still my main target.  There are a few sticking points that I'm trying to resolve, like handling certain internal functions and how to deal with out variables that get passed into nested pure functions (the sym lists don't permit easy optimisation in this case).

- I'm overhauling the CMOV generation code for x86 since it's quite a big convoluted mess.  Besides "outlining" the code, I want to refactor it so it's cleaner and more portable, as I intend to reuse it for the AArch64 peephole optimizer (using CSEL as opposed to CMOV).  I've found some new related optimisations as well but there are still some bugs I'm trying to fix.

- Speaking of AArch64, I'm developing more optimisations for it, both at the node level and the peephole level.

- I don't know what the eventual support for intrinsics will be for FPC, if it will ever get implemented, but I at the very least hope the internal nodes will be implemented some day, since compiler developers can then use them directly in the node pass for vectorisation and the like.  For one thing, once they are implemented for x86_64 (and maybe AArch64 too), I would like to see if I can adapt the uComplex unit to support vectorisation.

Kit

Reply by email

Florian Klämpfl
to J. Gareth Moreton
Am 08.11.2023 um 21:22 schrieb J. Gareth Moreton via fpc-devel : - I don't know what the eventual support for intrinsics will be for FPC, if it will ever get implemented, but I at the very least hope the internal nodes will be implemented some day,

Aren’t they already? Not working well though …

since compiler developers can then use them directly in the node pass for vectorisation and the like. For one thing, once they are implemented for x86_64 (and maybe AArch64 too), I would like to see if I can adapt the uComplex unit to support vectorisation.

I would pretty much see the uComplex unit being autovectorized instead.

Reply by email

J. Gareth Moreton
to Florian Klämpfl
Florian Klämpfl wrote
> Am 08.11.2023 um 21:22 schrieb J. Gareth Moreton via fpc-devel: > > - I don't know what the eventual support for intrinsics will be for FPC, if it will ever get implemented, but I at the very least hope the internal nodes will be implemented some day, Aren’t they already? Not working well though …

I'll have to double-check.  Last I recall they weren't available, but I haven't looked in that area for a while.

> since compiler developers can then use them directly in the node pass for vectorisation and the like. For one thing, once they are implemented for x86_64 (and maybe AArch64 too), I would like to see if I can adapt the uComplex unit to support vectorisation. I would pretty much see the uComplex unit being autovectorized instead.

That was my intention... using uComplex and similar units as a test case to detect auto-vectorisation.

Kit

Reply by email