Re: Inlined functions from compiled units

Marco van de Voort via fpc-pascal <[email protected]>
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <[email protected]>
Op 24-1-2025 om 13:10 schreef Hairy Pixels via fpc-pascal:
>>
>> 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.

Note that one strategy doesn't inhibit the other.

I in theory FPC could do the double build strategy to improve inlining 
performance further, but that would be a considerable feature of course. 
Both more mandatory inlining and resolving more complicated mutual 
inlining patterns.

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.