Page 1 of 1

LTO or not LTO that is the question

Posted: Thu Dec 08, 2016 2:43 pm
by Tabulous
Can some one explain the benefits ?

The down side is it hinders debuging........ variables with ext .lto_priv cant be veiwed in the debugger window

Re: LTO or not LTO that is the question

Posted: Thu Dec 08, 2016 3:15 pm
by Giovanni
Hi,

The plus should be a greater optimization resulting in more speed and/or lower code size.

You should be able to assess the difference easily.

Giovanni

Re: LTO or not LTO that is the question

Posted: Thu Dec 08, 2016 3:25 pm
by Tabulous
Giovanni wrote:Hi,

The plus should be a greater optimization resulting in more speed and/or lower code size.

You should be able to assess the difference easily.

Giovanni


with lto on some globals cant be added to the variable view when debugging. If you disable lto everything works fine.

So for me lto is a hindrance, just like most optimizations are. First thing i do when starting a new project is set -O0.

Re: LTO or not LTO that is the question

Posted: Thu Dec 08, 2016 3:46 pm
by Giovanni
It is not useful during development for sure. It is not mandatory anyway, our default settings are for "final" phase.

Giovanni