[fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

Ben Grasset operator97 at gmail.com
Sun Oct 28 02:11:18 CEST 2018

On Sat, Oct 27, 2018 at 6:46 PM Sven Barth via fpc-devel <
fpc-devel at lists.freepascal.org> wrote:

> Except of course for optimizations that can be done on the platform
> independent node tree.

That specifically is IMO the "key" to a higher compiler-wide level of
optimization capabilities, as shown by various more recent compilers for
other languages and also by LLVM. Target-CPU-level optimizations are
certainly still very necessary for some things, but it you pass the
assembly code generator better information to begin with they're not nearly
as relevant. I've been looking over the compiler codebase recently and
there's quite a few things that could obviously be done better IMO at the
top level before any platform specific-stuff comes into play.

There's also a number of things that would specifically help the build-time
performance of the compiler itself that I've noticed, such as there being
many, many, many, one-liner functions and procedures that should almost
certainly be marked as inline but currently are not. Also linked lists
absolutely everywhere, that would perform much better as array based lists.

If the core team is open to arbitrary/speculative patches I might try to
work out a few for what I think are the most important issues and submit
them for consideration sometime in the near future.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20181027/884d9c1c/attachment.html>

More information about the fpc-devel mailing list