Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Building The Linux Kernel With LLVM/Clang Continues

  1. #1
    Join Date
    Jan 2007
    Posts
    13,466

    Default 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...

    http://www.phoronix.com/vr.php?view=MTE3MTc

  2. #2
    Join Date
    Sep 2007
    Posts
    242

    Default

    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?

  3. #3
    Join Date
    Nov 2007
    Posts
    1,024

    Default

    Quote 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.

  4. #4
    Join Date
    Oct 2009
    Posts
    845

    Default

    Quote 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.

  5. #5
    Join Date
    Apr 2011
    Posts
    5

    Default

    Quote 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

  6. #6
    Join Date
    Sep 2007
    Posts
    242

    Default

    It seems, as if clang on ARM isn't doing so bad at all:
    http://www.phoronix.com/scan.php?pag...tem&px=MTExNzg

  7. #7
    Join Date
    Apr 2011
    Posts
    5

    Default

    Quote 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

  8. #8
    Join Date
    Oct 2009
    Posts
    845

    Default

    Quote 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.

  9. #9
    Join Date
    Apr 2011
    Posts
    5

    Default

    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; 08-30-2012 at 05:09 AM.

  10. #10
    Join Date
    Apr 2011
    Posts
    5

    Default

    Quote 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).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •