[fpc-pascal] Inlined functions from compiled units

Hairy Pixels genericptr at gmail.com
Fri Jan 24 13:10:06 CET 2025


 On Jan 24, 2025 at 5:46:40 PM, Marco van de Voort via fpc-pascal <
fpc-pascal at lists.freepascal.org> wrote:

> Slightly different. LTO afaik requires multiple compiles where the later
> build uses info from the earlier build.
>
> The FPC implementation inlines if the unit-with-function-to-be-inlined
> was compiled before the unit that references the inline function. That
> is within the /same/ (single) build, but also has as disadvantage afaik
> that if it is NOT like that, it won't be inlined.
>

I think that’s right. LTO is much slower too so there’s  that. I think
Jonas once said in the LLVM backend it was 15% faster because of aggressive
inlining.

Regards,
    Ryan Joseph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20250124/e9703f6d/attachment.htm>


More information about the fpc-pascal mailing list