Announcement

Collapse
No announcement yet.

Firefox Is Now Built With Clang+LTO Everywhere, Sizable Performance Wins For Linux

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

  • #31
    Originally posted by Michael_S View Post
    Oh yikes, that was true at one point?
    Yes, there was quite a ruckus when people realized that using windows Firefox under wine was faster than running native Linux Firefox binaries.

    Turned out that the main reason was that the Windows binaries were built with PGO, which was not true for Firefox for Linux. Then PGO was fixed to compile with Linux, but I'm not sure what the case is these days. Also judging by the article, PGO is only working for Firefox Linux when compiling with Clang/LLVM at the moment.

    It will be fixed undoubtably given that Mozilla has made it clear they will only support the Clang/LLVM toolchain for Firefox going forward.

    Comment


    • #32
      Originally posted by pirx View Post
      Arch uses clang for a long time
      Ehh ? Do you mean that Arch has Clang/LLVM in their repositories and that it's used for projects which require it, that is true.

      However the vast majority of packages are built using GCC as it's the default compiler toolchain for Arch. For example, Firefox which we are discussing here, is built using GCC on Arch.

      Comment


      • #33
        Originally posted by Weasel View Post
        GCC has better optimizers than Clang. Only problem is that its LTO has some of bugs so some projects don't compile well with it.
        That goes both ways, I've been trying to build Blender with Clang/LLVM using LTO but it won't build, meanwhile it works fine using GCC.

        Comment


        • #34
          current clang with lto is faster than two year old gcc without lto. who would've thought

          Comment


          • #35
            Originally posted by pyler View Post
            Clang enables cross-language inlining with Rust which is another huge performance step.
            that's because rust is not a real language, but llvm frontend

            Comment


            • #36
              Originally posted by Weasel View Post
              GCC has better optimizers than Clang. Only problem is that its LTO has some of bugs so some projects don't compile well with it.
              i think main problem here is that they are using gcc 6 instead of 8. lto support improved since then

              Comment


              • #37
                also couldn't resist
                mozilla: we are building a better internet. for windows users

                Comment


                • #38
                  Originally posted by pyler View Post
                  Clang enables cross-language inlining with Rust which is another huge performance step.
                  I think that's the main thing. Rust itself is based on LLVM so as large parts of the Firefox code base move to it, having both Rust and C/C++ use the same compiler back-end is a huge advantage.

                  Comment


                  • #39
                    Talos benchmarks GCC 7 builds using LTO+FDO from half a year ago comopared to today trunk (clang build I think) are here
                    https://treeherder.mozilla.org/perf....meRange=172800.

                    Comparing LTO+PGO between bth compilers seems to favour GCC.
                    I am building Firefox with LTO+PGO using GCC regularly. Usually linker errors are just missing attribute ((used)) on variables used by toplevel asm statements.
                    Last edited by hubicka; 13 September 2018, 03:25 AM.

                    Comment


                    • #40
                      Originally posted by hubicka View Post
                      Comparing LTO+PGO between bth compilers seems to favour GCC.
                      I am building Firefox with LTO+PGO using GCC regularly. Usually linker errors are just missing attribute ((used)) on variables used by toplevel asm statements.
                      Sounds like it's not a GCC LTO bug then, but a crappy project assuming stuff it shouldn't. I think it's very awesome that GCC removes such unused crap with LTO, you guys did a great job there for sure.

                      Please don't have GCC keep redundant garbage there just to deal with such crappy written projects (i.e. current behavior is fine!), but maybe some sort of other warnings would be easier to know the cause than just a linking error? Dunno if it's feasible. Been a while since I looked at GCC sources.

                      Comment

                      Working...
                      X