On 9/23/19 2:06 PM, Bruce Richardson wrote: > On Mon, Sep 23, 2019 at 02:03:35PM +0200, Andrzej Ostruszka wrote: [...] >> So it is similar ~5x increase as Mattias has reported. Have not >> measured it, but the lion share of that increase is due to linking of >> 'test' apps. >> > > Interesting. Do we want to explicitly not use lto for the test app?
It is the linking of these apps where LTO really kicks in. During compilation of objects compiler just additionally generates internal representation (in extra sections of ELF object). Linking these objects into library does not do much - so the actual optimization is done when producing final executable. It might be so that when using dedicated user app the penalty would be much smaller since the amount of code used would be much smaller - but FWIW all the warnings that I was fixing were produced by the linking of app/test* binaries. Regards Andrzej