Announcement

Collapse
No announcement yet.

Link-Time Optimizing Improved, But Still Takes A While On GCC 4.9

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Link-Time Optimizing Improved, But Still Takes A While On GCC 4.9

    Phoronix: Link-Time Optimizing Improved, But Still Takes A While On GCC 4.9

    The GCC 4.9 compiler that's about to be released has many improvements, including in the area of LTO (Link-Time Optimizations), but you must still have a fair amount of patience to compile with LTO support...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    It would be interesting to compare compiles of Firefox, Chromium, Libreoffice, and Perl, including their memory usage.

    Comment


    • #3
      You should also pass -fno-fat-lto-objects to GCC to make sure that LTO is used all the way. You generally want to use -fuse-linker-plugin too.

      Comment


      • #4
        GCC 4.9 now defaults to -fno-fat-lto-files when plugin enabled linker is available. This should be visible in the benchmarks by about halving the LTO compile time. Also w/o plugin the LTO performance improvements are much smaller than with.

        Michael, can you, please, repeat the benchmarks with plugin support?

        Comment


        • #5
          Also forgot to add, if you use parallel make (-j=N), you probably also want to pass -flto=n to parallelize the LTO build process.

          Comment


          • #6
            Originally posted by STrRedWolf View Post
            It would be interesting to compare compiles of Firefox, Chromium, Libreoffice, and Perl, including their memory usage.
            I am slowly working on this, the first three are hard to benchmarks. Perl is an interesting candidate indeed.
            So far I tested firefox at Dromaeo (that is rather poor benchmark for compiler generated code by spending a lot of time either in JIT generated code or tight string manipulation loops). Still the benefits are measurable http://dromaeo.com/?id=219677,219672,219877

            It compares normal build, LTO build and LTO profiledbuild. So 7% for LTO and 14% for LTO+PDO (I repreated the tests to check it is off noise)

            Comment


            • #7
              hubicka, will we see the icf/semantic function/duplicate function removal in gcc 4.10?

              Comment


              • #8
                Originally posted by hubicka View Post
                I am slowly working on this, the first three are hard to benchmarks. Perl is an interesting candidate indeed.
                So far I tested firefox at Dromaeo (that is rather poor benchmark for compiler generated code by spending a lot of time either in JIT generated code or tight string manipulation loops). Still the benefits are measurable http://dromaeo.com/?id=219677,219672,219877

                It compares normal build, LTO build and LTO profiledbuild. So 7% for LTO and 14% for LTO+PDO (I repreated the tests to check it is off noise)
                Can the Kernel be profiled? I think that is where it could gain some speed.

                Comment


                • #9
                  Originally posted by toyotabedzrock View Post
                  Can the Kernel be profiled? I think that is where it could gain some speed.
                  Kernel needs custom profiling runtime (libgcov). Google is definitely using it and they recently submitted patches to make GCC's libgcov bit more modular. I did not try it myself though. http://ltp.sourceforge.net/archive/o...-kernel.readme seems to have some docs.

                  Comment


                  • #10
                    Originally posted by curaga View Post
                    hubicka, will we see the icf/semantic function/duplicate function removal in gcc 4.10?
                    Most probably. The patch needs review, but that is scheduler for early stage 1. (Among quite few other changes related to LTO).

                    Comment

                    Working...
                    X