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
<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 direct calls)
the node tree is stored in the PPU. And this node tree is then used
for inlining the function.
oh it’s in the PPU. Ok that makes sense. I guess that serves the same
purpose as the LTO system in other compilers. I was curious if this
was maybe something on the TOOD list or partially implemented. Thanks.
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.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal