Results 1 to 10 of 38

Thread: Moving Towards Building The Linux Kernel With Clang

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    15,391

    Default Moving Towards Building The Linux Kernel With Clang

    Phoronix: Moving Towards Building The Linux Kernel With Clang

    While it hasn't been a news item for a couple months, a group of developers are still hard at work to advance the LLVM/Clang compiler and the Linux kernel to a point where this alternative compiler to GCC can be used for building the Linux kernel...

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

  2. #2
    Join Date
    Sep 2011
    Posts
    707

    Default

    Any bench marks for this kernel?

  3. #3
    Join Date
    Sep 2012
    Posts
    363

    Default

    Quote Originally Posted by AJenbo View Post
    Any bench marks for this kernel?
    GCC is faster or much faster in most cases.
    http://www.phoronix.com/scan.php?pag...m32_svn1&num=1

  4. #4
    Join Date
    Sep 2011
    Posts
    707

    Default

    Quote Originally Posted by JS987 View Post
    GCC is faster or much faster in most cases.
    http://www.phoronix.com/scan.php?pag...m32_svn1&num=1
    Yeah, but it would still be interesting to see how it affects things in general to have the kernel compiled this way (so i would sugest having the actual test be compiled with the same compiler for both test runs).

  5. #5
    Join Date
    Oct 2009
    Posts
    845

    Default

    Quote Originally Posted by AJenbo View Post
    Yeah, but it would still be interesting to see how it affects things in general to have the kernel compiled this way (so i would sugest having the actual test be compiled with the same compiler for both test runs).
    I'd say the kernel is one of the system components where there is the least opportunity for a compiler toolchain switch to provide a notable performance increase given how optimized it already is by using compiler extensions and hand-written assembly in areas where performance really counts. Also atleast on the x86-64 architecture Clang/LLVM generally generates slower code than GCC so it's extremely unlikely there's any performance to be gained there.

    On the other hand as mentioned in the 'article' Qualcomm which seems to be the company interested in getting clang/llvm building Linux is ARM based and perhaps Clang/LLVM has an upper hand on ARM optimization against GCC, I have never benchmarked on that architecture so I don't know. Still I doubt think there's much of a performance boost to be had on the kernel from a compiler standpoint, that said it's always a guess until you see actual numbers.

  6. #6
    Join Date
    Sep 2011
    Posts
    707

    Default

    Quote Originally Posted by XorEaxEax View Post
    that said it's always a guess until you see actual numbers.
    My point excatly

    Also i might highlight unexpected things about the kernel.

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

    Default

    Quote Originally Posted by JS987 View Post
    GCC is faster or much faster in most cases.
    http://www.phoronix.com/scan.php?pag...m32_svn1&num=1
    None of the "much faster" cases will affect the kernel in any way (they're all parts of highly specialized benchmarks that opt in to non-standard C/C++ extensions, e.g. OpenMP, rather than coding those features natively; Clang is gaining OpenMP), and many of the rest will also have small to little impact on the kernel (SIMD/auto-vectorization support, etc.).

    Benchmarks of user-space programs that are themselves highly specialized really can't do more than vaguely hint at what the kernel compiled performance will be.

  8. #8
    Join Date
    Jun 2009
    Posts
    2,932

    Default

    Quote Originally Posted by elanthis View Post
    Clang is gaining OpenMP
    Good for them, OpenMP is brilliant and far superior to having to do your own thread management every time you have a "for" loop.

    OpenMP is a wonderful and necessary technology in the age where 8-core processors are increasingly common, and even mobile phones are becoming multi-core.

  9. #9

    Default What's wrong with GCC?

    Can someone point out once again, what exactly is wrong with GCC?

    I'm not one to say that side projects are useless as I think that 95% of side projects have some merit, but this?

    What's the upside?

Posting Permissions

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