Getting ready for GCC 5.1

Confusingly, GCC has a new, weird, version scheme. The first release of GCC 5 will be 5.1. It is due soon (next week). For that reason, and because it's better to find compiler bugs before it's released, I started looking into building Firefox with it.

The first round of builds I did was with 5-20150405. That got me to find a small bunch of issues:

So that got me to do a second round with the first 5.1 RC, which had the fix for that ICE.

With all the above fixed, I could finally get builds out of try, and tests running, which revealed two more issues:

  • Another (quickly fixed) Internal Compiler Error on 32-bits PGO builds (but only for a nightly setup, with --enable-profiling, not for a release setup, which doesn't have it).
  • JS engine assertions during some JIT tests on 64-bits builds (with or without PGO), which Dan Gohman kindly tracked down and reduced to a small test case allowing to file a GCC bug and bisect to pinpoint at the GCC upstream commit that broke it (yay git bisect run on a 36-CPU EC2 instance).

Preliminary results are promising, with benchmarks improving up to 16%, but the comparison wasn't entirely fair, because they compared GCC 4.8 builds with frame pointers and JS engine diagnostics to GCC 5.1 builds without.

I'll also give a spin to LTO, possibly finding more GCC bugs in the process.

2015-04-15 03:59:43+0900

p.m.o

You can leave a response, or trackback from your own site.

3 Responses to “Getting ready for GCC 5.1”

  1. AnimalFriend Says:

    What are you expecting from / looking forward to w/ gcc5? Is it better execution speed or C++11 support (are you using this in FFx already)?
    Or just because it’s going to be the standard 2yrs from now?

    Also I wanted to thank you for your posts. You don’t get many comments, but that doesn’t mean no one’s reading. Obviously. ;-)

  2. glandium Says:

    @AnimalFriend, I was interested in the presumed LTO improvements. But mostly, my main focus was just ensuring that GCC 5.1 was not going to fail to build Firefox properly, which, as it happens, it was going to.

  3. Jan Hubicka Says:

    I hope we will get the improvements for LTO, too. I sent you email concerning the talos benchmarks.

Leave a Reply