[fpc-devel] Kit's current work

J. Gareth Moreton gareth at moreton-family.com
Wed Nov 8 21:22:57 CET 2023


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



More information about the fpc-devel mailing list