[fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM
jonas at freepascal.org
Sat Oct 27 14:46:37 CEST 2018
On 27/10/18 05:45, Ben Grasset wrote:
> As far as dependencies, it would add
> none whatsoever other than a copy of the LLC or LLVM-AS binaries (as in,
> no more than any other target FPC supports. Just think of it as yet
> another assembler format.)
You also need "opt" if you want to perform full optimizations (or just
use clang, which a.o. combines the functionality of llc and opt).
There's one more problem I forgot to mention in my first post, and it is
probably a deal breaker for the original bounty: LLVM does not support
Borland's fastcall calling convention for i386. So you would need to add
support for Borland fastcall on i386 to LLVM if it has to support
existing i386 inline assembly routines written for FPC/Delphi.
Finally, adding support for 32 bit targets in FPC's LLVM backend would
also require some work due to how FPC's code generator is structured,
and due to the fact that need to have two code generators in a single
binary (the native one to support the generation of entry and exit code
for pure inline assembler routines, and the LLVM one for the rest).
More information about the fpc-devel