Hi,

 something that appears  to help is to put units in the interface uses rather than the implementation uses.

When the unit mentioned in the interface uses, uses the first unit in its implementation uses, it can inline the functions from the first unit. Although I would have expected it to do the opposite.

Unfortunately that does not help if the second unit needs to use types from the first unit in its interface

Best,
Benito

Am 12.01.19 um 13:05 schrieb denisgolovan:

12.01.2019, 14:53, "Jonas Maebe" <jo...@freepascal.org>:
Not at this time (unless you use the LLVM backend).
Could you give some hints on how to enable WPO/LTO under LLVM backend?
http://wiki.freepascal.org/LLVM does not seem to mention anything on that.

However, what you actually can do, is manually recompile all units of your 
program
multiple times. While this won't help with inline functions called
before they are parsed in those same units, it will allow inlining of
function bodies in other units that were not available during the first
compilation due to dependency cycles.
Eh.
It does not look too practical, right?
Unless there is some magical receipt for that :)

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to