4.9 uses slim LTO information by default, which is hard to
be recognized in GDB at present, so you can wait for next GDB period.

And you can try to use -flto -ffat-lto-objects to enable fat LTO
information.


On Wed, Jul 2, 2014 at 7:05 AM, Antony Riakiotakis <kal...@gmail.com> wrote:

> That was the gcc manual:
>
>
> https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Optimize-Options.html#Optimize-Options
>
> quote:
>
> "Link-time optimization does not work well with generation of debugging
> information. Combining -flto with -g is currently experimental and
> expected to produce unexpected results. "
>
>
> On 27 June 2014 01:19, Riot <rain.back...@gmail.com> wrote:
>
>> I currently use LTO in production code.
>>
>> I and my team have been using LTO since gcc 4.7, although as you say it's
>> more mature in 4.9.  We are a small games development house so performance
>> is critical and LTO makes a big difference to our release builds.  However,
>> I have also seen a few spurious bugs that I was not able to isolate with
>> 4.9.0 that were not present with 4.8; especially one case where perfectly
>> valid and bug-free code was segfaulting when compiled with LTO; unless
>> "remedied" by std::cout-ing one of the variables involved before it was
>> used in the function call producing the segfault.
>>
>> We were later able to avoid the bug by not returning a container as we
>> were doing before, but passing it by reference to the same function.  I
>> would have liked to be able to report it but i was never able to isolate a
>> clean test-case, as changing other code in other compile units made it
>> disappear or reappear arbitrarily (further confirming that it was
>> specifically an issue with LTO).
>>
>> However, this was an isolated incident and we haven't had more of those
>> since; also 4.9.1 is now out which may fix a lot of these issues.  I should
>> also note that we also optimise our release builds with -Ofast which
>> enables unsafe math optimisations, which may have been a contributing
>> factor in that case.  It's hard to debug potential LTO issues because it
>> doesn't play well with debugging symbols; in fact I recall reading
>> somewhere that using both LTO and -g can produce undefined compiler
>> behaviour, although I cannot now find this quote, so you may want to take
>> that with a pinch of salt.
>>
>> TL;DR: LTO is mature enough to use in production code, and the benefit is
>> large, but keep an eye out for any remaining bugs, and test your release
>> build properly rather than assuming it'll work because your debug build
>> works.
>>
>>
>> SlowRiot
>>
>>
>> On 25 June 2014 15:14, <m...@morous.org> wrote:
>>
>>>
>>> Hello,
>>>
>>> when I tried LTO (link time optiomization) the last time (gcc 4.8 or 4.7,
>>> I do not remember precisely), it did not work much for me (frequent
>>> crashes during my project build with LTO enabled).
>>>
>>> I know gcc dev team spent a lot of time on improving LTO in 4.9.
>>>
>>> So, what is LTO status in mingw-w64 now? Do you consider it already "a
>>> standard feature" or is it still experimental thing and there may be
>>> lions
>>> hidden on the way? Anyone out there who already uses mingw-w64 with LTO
>>> in
>>> production?
>>>
>>> Thanks in advance for any feedback,
>>> Martin
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Open source business process management suite built on Java and Eclipse
>>> Turn processes into business applications with Bonita BPM Community
>>> Edition
>>> Quickly connect people, data, and systems into organized workflows
>>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
>>> http://p.sf.net/sfu/Bonitasoft
>>> _______________________________________________
>>> Mingw-w64-public mailing list
>>> Mingw-w64-public@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Open source business process management suite built on Java and Eclipse
>> Turn processes into business applications with Bonita BPM Community
>> Edition
>> Quickly connect people, data, and systems into organized workflows
>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
>> http://p.sf.net/sfu/Bonitasoft
>> _______________________________________________
>> Mingw-w64-public mailing list
>> Mingw-w64-public@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>
>>
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>


-- 
Best Regards,
xunxun
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to