Re: [fpc-pascal] Inlined functions from compiled units

2025-01-24 Thread Marco van de Voort via fpc-pascal
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

Re: [fpc-pascal] Inlined functions from compiled units

2025-01-24 Thread Hairy Pixels via fpc-pascal
Since I’m topic on inlines. FPC always inlines even with debug flags and makes certain files impossible to break on. Is there a way to disable that? I would expect inlining to be off so you can could debug. I don’t have -Si on either which suggests it must be on to inline but I don’t see that happe

Re: [fpc-pascal] Inlined functions from compiled units

2025-01-24 Thread Hairy Pixels via fpc-pascal
On Jan 24, 2025 at 5:46:40 PM, Marco van de Voort via fpc-pascal < fpc-pascal@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-inline

Re: [fpc-pascal] Inlined functions from compiled units

2025-01-24 Thread Marco van de Voort via fpc-pascal
Op 24-1-2025 om 09:58 schreef Hairy Pixels via fpc-pascal: On Jan 24, 2025 at 2:01:09 PM, Sven Barth via fpc-pascal wrote: When a function has inlining enabled (either explicit with the inline directive or implicit through AutoInline optimization) then in addition to generating its code to th

Re: [fpc-pascal] Inlined functions from compiled units

2025-01-24 Thread Hairy Pixels via fpc-pascal
On Jan 24, 2025 at 2:01:09 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > When a function has inlining enabled (either explicit with the inline > directive or implicit through AutoInline optimization) then in addition to > generating its code to the object file (for dir

Re: [fpc-pascal] Inlined functions from compiled units

2025-01-23 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Fr., 24. Jan. 2025, 02:17: > Is the compiler actually able to inline functions which are used from a > unit? When a unit is used it’s compiled to a .o file and linked so the > compiler doesn’t have access to the source code anymore and thus can’t > inline I