Inlined functions from compiled units

Hairy Pixels via fpc-pascal <[email protected]>
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <CAGsUGt=QtMNxDPsKvDaOT-mJpeCkf1HtDk8yiSZUJaLEw1ZLgw@mail.gmail.com>
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 would think.

I write this because I’ve recently learned of link-time optimizations (LTO)
from LLVM where modules are compiled to bitcode which can be linked
together and inlined. It’s probably much slower than using precompiled .o
files but good for release builds. Without that I don’t see how the
compiler can inline any code called from units, which includes the whole
RTL!

Regards,
    Ryan Joseph

_______________________________________________
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.