Announcement

Collapse
No announcement yet.

Building The Linux Kernel With LLVM/Clang Continues

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

  • Building The Linux Kernel With LLVM/Clang Continues

    Phoronix: Building The Linux Kernel With LLVM/Clang Continues

    Developers continue to work on support for allowing the LLVM/Clang compiler to build the mainline Linux kernel...

    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
    Among the reasons developers have been interested in using the Clang compiler on the Linux kernel comes down to possible performance gains, the diagnostics reporting offered by Clang compared to GCC, the very powerful static analysis support offered by Clang, and just freeing the dependence upon GCC.
    All true... but possible performance gains? On ARM? With LLVM? AFAIK LLVM isn't very competitive on ARM, yet... Or did I miss something?

    Comment


    • #3
      Originally posted by oleid View Post
      All true... but possible performance gains? On ARM? With LLVM? AFAIK LLVM isn't very competitive on ARM, yet... Or did I miss something?
      The recentish benchmarks I've seen are a bit all over the map. Some tests are faster in GCC, some are faster with LLVM, and a small few that rely on OpenMP are significantly faster with GCC. OpenMP support is being worked on for Clang, of course.

      Given that most of the major OS vendors in the ARM space have moved or are moving to Clang (e.g., Apple and Google), I'd expect LLVM to improve quite rapidly in this area.

      Comment


      • #4
        Originally posted by oleid View Post
        All true... but possible performance gains? On ARM? With LLVM? AFAIK LLVM isn't very competitive on ARM, yet... Or did I miss something?
        I don't know anything about comparative performance of Clang/LLVM vs GCC on ARM, could be Clang/LLVM has a better performance there, has anyone seen any published benchmarks?

        I only know x64 as that is what I work with and benchmark regularly, and there GCC reigns supreme performance-wise, typically 5-15% on cpu intensive code and that's without openmp or PGO.

        Comment


        • #5
          Originally posted by oleid View Post
          All true... but possible performance gains? On ARM? With LLVM? AFAIK LLVM isn't very competitive on ARM, yet... Or did I miss something?
          LLVM/Clang is the toolchain used by Apple for iOS - both iPads and iPhones use ARM SoC designs. LLVM/Clang is also used for Android's RenderScript.

          - Bryce Adelstein-Lelbach

          Comment


          • #6
            It seems, as if clang on ARM isn't doing so bad at all:
            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

            Comment


            • #7
              Originally posted by elanthis View Post
              Given that most of the major OS vendors in the ARM space have moved or are moving to Clang (e.g., Apple and Google), I'd expect LLVM to improve quite rapidly in this area.
              LLVM/Clang ARM support has been developed aggressively for awhile now.

              LLVMLinux is interested in supporting Linux kernel compilation in general. Different developers involved may work on a specific platform, but our general direction is widespread support for commonly used hardware architectures.

              - Bryce Adelstein-Lelbach

              Comment


              • #8
                Originally posted by oleid View Post
                It seems, as if clang on ARM isn't doing so bad at all:
                http://www.phoronix.com/scan.php?pag...tem&px=MTExNzg
                Well that benchmark test really is inconclusive, on the only test where optimization flags is specified, which is the C-Ray test (-O3) GCC beats Clang/LLVM by quite a margin, on the other tests no optimization setting is declared and I know that the p7zip package defaults to -O0 unless you actually specify a optimization level which makes that test totally pointless as -O0 is no optimization.

                That leaves TSCP where GCC wins by some margin and which also hasn't got any optimization level declared, I don't know what if any level it defaults to. Again Phoronix benchmarks is a sad state of affairs.

                Comment


                • #9
                  Kudos to Michael for covering this, BTW.

                  If anyone has any questions about the project, just ask them here and I'll get back to you within a day or so.

                  - Bryce Adelstein-Lelbach
                  Last edited by blelbach; 30 August 2012, 05:09 AM.

                  Comment


                  • #10
                    Originally posted by oleid View Post
                    All true... but possible performance gains? On ARM? With LLVM? AFAIK LLVM isn't very competitive on ARM, yet... Or did I miss something?
                    LLVM/Clang is used by Apple as the toolchain for iOS. Both the iPad and the iPhone are ARM SoC (system-on-chip) devices. LLVM/Clang have had strong support for a variety of platforms since the early days of the project. In fact, LLVM has always supported multiple target backends (you tell LLVM which backends to build when compiling).

                    Comment

                    Working...
                    X