Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 38

Thread: Moving Towards Building The Linux Kernel With Clang

  1. #11
    Join Date
    Sep 2011
    Posts
    156

    Default

    Quote Originally Posted by yogi_berra View Post
    It embodies everything that is wrong with "free" software. From the idiotic bureaucracy of the steering committee to the horrible code documentation to the inability to address bugs in a timely manner to the rejection of bugfixes because of who wrote them.

    It's a bloated steaming pile of stuff even without the idiocy of gpl zealots that left people with a choice, fork gcc (again) or start a new compiler from scratch.
    This folks is the reason not to sniff glue and/or huff paint, its makes you believe and say things that are not true.

  2. #12
    Join Date
    Oct 2009
    Posts
    845

    Default

    Quote Originally Posted by yogi_berra View Post
    It embodies everything that is wrong with "free" software. From the idiotic bureaucracy of the steering committee to the horrible code documentation to the inability to address bugs in a timely manner to the rejection of bugfixes because of who wrote them.

    It's a bloated steaming pile of stuff even without the idiocy of gpl zealots that left people with a choice, fork gcc (again) or start a new compiler from scratch.
    lol, this 'setaming pile' has been powering all open source systems and a huge amount of proprietary solutions across a huge amount of architectures (more than any other) for a _very_ long time and it's success is evident in how these systems, Linux in particular has made a huge impact on the computing landscape, in everything from servers, hpc, embedded and mobile.

    If it's everything thats 'wrong with free software' then there's obviously nothing wrong with free software, you need to power-up your anti-gpl-fsf trolling.

  3. #13
    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.

  4. #14
    Join Date
    Sep 2011
    Posts
    683

    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.

  5. #15
    Join Date
    Nov 2007
    Posts
    1,024

    Default

    Quote Originally Posted by halfmanhalfamazing View Post
    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?
    Long Version

    Clang is a superior compiler frontend. Whether or not LLVM is a superior backend (by "speed benchmark" standards it is not, yet; there are other reasons one might prefer it, however), Clang is faster to compile, tends to provide better diagnostics (GCC did some catching up after being slapped in the face with how awful its diagnostics were, but Clang isn't sitting still), Clang MUCH easier to extend and improve, has fantastic analysis tools, and has been explicitly built to be reused as a higher-level tool aside from simply compiling code into assembler.

    GCC has tons of cruft and is difficult to work with; this has led to a general problem gaining new contributors, a slow exodus of existing developers (especially to Clang, which is more or less feature comparable but friendlier to work on), and requires lots of expert knowledge to even make a simple bug fix (as opposed to Clang, where even a total newbie can jump in and start doing pretty interesting things pretty quickly).

    Part of this is a very explicit difference in design. GCC is an integrated whole that is not intended to be separable at all. Very very explicitly, in fact, and not for _any_ technical reason: it was because RMS was afraid that if the GCC frontend and GCC backend were usable independently, then evil vile horrible proprietary companies might use one or the other with a proprietary tool. Clang, on the other hand, was designed with full knowledge of the fact that the absolute least important thing that a compiler frontend can be used for in this day and age is the actual compilation. All the real action -- all the work that saves developers times and makes them enjoy their job -- takes place in higher level development tools, which require deep language integration. Given the huge complexity of C++, very few such tools have been developed, and most of them are quite flawed. (Visual Assist X generally is considered the best of such tools, and as a frequent user, I can attest to how often it screws up and pissed me off; compare to modern Java or C# environments where the tools are more or less perfect.) Clang allows more such tools to be written (particularly, FOSS tools, which do not currently compete favorably with their proprietary rivals) and allows them to have an excellent understanding of the language -- the exact same understanding of the language as the compiler itself, in fact.

    Being able to compile the code is thus secondary to Clang's real strength. It's still important, however, since there are some features Clang enables that GCC frowns upon (easy injection of user-specified code in the appropriate places for application-specific instrumentation, for example), and additionally because you can't be sure your frontend actually works 100% correctly if you aren't using it to generate working code (since the only way to know that your model of the code is correct is to run the code's test cases, which require it to be compiled).

    Also, LLVM is possibly going to be faster than GCC in the future. Given the rate of change between the two projects, it's quite likely that'll happen, assuming LLVM development doesn't start to drastically slow down or GCC drastically speed up. While it's true there aren't a lot of low-hanging fruit left for LLVM in terms of performance, there's still a lot of opportunities for it to match and then pull ahead of GCC, and it's simply easier to write those optimization for LLVM's framework than it is to write them for GCC's. That is, again, very valuable if you're a compiler developer.

    There's also features that LLVM itself provides that GCC does not. LLVM has a JIT mode, which has been used for some very interesting things (like a massively updated and more complete CINT). LLVM has a very interesting IR model, which has allowed for projects like Portable NaCl which would otherwise be incredibly difficult to pull off. I'm unsure what if any benefits there are for kernel developers, but there are certainly a good number of them for userspace developers.

    Shot Version

    The key goal of Clang is to support tools like fully accurate code completion, large-scale invasive automatic refactoring support, highly detailed static analysis, semantic and structural analysis for automatic documentation/binding generation, user customizable instrumentation and code morphing, and so on. Being able to use even just one of those tools when developing the kernel makes it entirely worth ensuring that Clang/LLVM are capable of fully and correctly parsing (and then compiling) the kernel source code.

  6. #16
    Join Date
    Apr 2010
    Posts
    1,946

    Default

    Quote Originally Posted by halfmanhalfamazing View Post
    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?

    Quote Originally Posted by pingufunkybeat View Post
    Its license changed from GPL v2 to GPL v3.

    Apple refuses to use GPL v3 software, probably because of the patent provisions that would interfere with Apple's ability to sue every living organism in the universe.

    After the license changed, Apple poured huge amounts of money into Clang. The rise of Clang is essentially Apple showing the FSF the middle finger. They built their entire product line on GCC, but didn't like the license change and now they are replacing it with their own compiler. The bonus is that they can close it whenever they want.

    It's good to have more options, as long as they're standards-compliant. Clang will take over some of GCC's share on closed, proprietary systems (like MacOSX) and BSDs (because they prefer BSD-licensed software), but it will probably never endanger GCC on Linux.
    Partially incorrect.

    Completely correct, that *any* GPL is banned on Apple market.

    But remember, you don't need to opensource *ANYTHING* you build with GCC. This is sad, but it is fair and true.

    The real reason is quite simple - GCC is built and licensed from ground up in a way to prevent closing itself, or parts of it, or its extensions down.

    Apple can easily use some closed source LLVM extension to build its own parts, and you will be required to purchase it and be dependent on it.

  7. #17
    Join Date
    Apr 2010
    Posts
    1,946

    Default

    Quote Originally Posted by elanthis View Post
    Long Version

    Clang is a superior compiler frontend. Whether or not LLVM is a superior backend (by "speed benchmark" standards it is not, yet; there are other reasons one might prefer it, however), Clang is faster to compile, tends to provide better diagnostics (GCC did some catching up after being slapped in the face with how awful its diagnostics were, but Clang isn't sitting still), Clang MUCH easier to extend and improve, has fantastic analysis tools, and has been explicitly built to be reused as a higher-level tool aside from simply compiling code into assembler.

    GCC has tons of cruft and is difficult to work with; this has led to a general problem gaining new contributors, a slow exodus of existing developers (especially to Clang, which is more or less feature comparable but friendlier to work on), and requires lots of expert knowledge to even make a simple bug fix (as opposed to Clang, where even a total newbie can jump in and start doing pretty interesting things pretty quickly).

    Part of this is a very explicit difference in design. GCC is an integrated whole that is not intended to be separable at all. Very very explicitly, in fact, and not for _any_ technical reason: it was because RMS was afraid that if the GCC frontend and GCC backend were usable independently, then evil vile horrible proprietary companies might use one or the other with a proprietary tool. Clang, on the other hand, was designed with full knowledge of the fact that the absolute least important thing that a compiler frontend can be used for in this day and age is the actual compilation. All the real action -- all the work that saves developers times and makes them enjoy their job -- takes place in higher level development tools, which require deep language integration. Given the huge complexity of C++, very few such tools have been developed, and most of them are quite flawed. (Visual Assist X generally is considered the best of such tools, and as a frequent user, I can attest to how often it screws up and pissed me off; compare to modern Java or C# environments where the tools are more or less perfect.) Clang allows more such tools to be written (particularly, FOSS tools, which do not currently compete favorably with their proprietary rivals) and allows them to have an excellent understanding of the language -- the exact same understanding of the language as the compiler itself, in fact.

    Being able to compile the code is thus secondary to Clang's real strength. It's still important, however, since there are some features Clang enables that GCC frowns upon (easy injection of user-specified code in the appropriate places for application-specific instrumentation, for example), and additionally because you can't be sure your frontend actually works 100% correctly if you aren't using it to generate working code (since the only way to know that your model of the code is correct is to run the code's test cases, which require it to be compiled).

    Also, LLVM is possibly going to be faster than GCC in the future. Given the rate of change between the two projects, it's quite likely that'll happen, assuming LLVM development doesn't start to drastically slow down or GCC drastically speed up. While it's true there aren't a lot of low-hanging fruit left for LLVM in terms of performance, there's still a lot of opportunities for it to match and then pull ahead of GCC, and it's simply easier to write those optimization for LLVM's framework than it is to write them for GCC's. That is, again, very valuable if you're a compiler developer.

    There's also features that LLVM itself provides that GCC does not. LLVM has a JIT mode, which has been used for some very interesting things (like a massively updated and more complete CINT). LLVM has a very interesting IR model, which has allowed for projects like Portable NaCl which would otherwise be incredibly difficult to pull off. I'm unsure what if any benefits there are for kernel developers, but there are certainly a good number of them for userspace developers.

    Shot Version

    The key goal of Clang is to support tools like fully accurate code completion, large-scale invasive automatic refactoring support, highly detailed static analysis, semantic and structural analysis for automatic documentation/binding generation, user customizable instrumentation and code morphing, and so on. Being able to use even just one of those tools when developing the kernel makes it entirely worth ensuring that Clang/LLVM are capable of fully and correctly parsing (and then compiling) the kernel source code.
    This technical aspect is true, yet completely and utterly irrelevant. It is VERY easy to make something "superior" after someone alrealy makes the failures, in fact this is the right way for things to evolve. GCC "monolithic" structure, although it does support extensions, is due to prevent writing closed source extensions that will make developers dependent upon it and eliminate any "openness". If someone needs an improvement, he can easily apply it upstream. Upstream will reject anything closed, so efforts to submit closed source will fail and project will successfully remain OPEN. This is not the case with LLVM.

    This can be easily proven by two facts:
    1) first, newer project (LLVM) NOT using *any* GPL and instead picking up BSD license.

    BSD license is proven to be prioritized over GPL for single reason: BSD promotes closed source software.

    2) second, the name choosen is NOT "GCC" or anything related to "GCC". Compare to "Mplayer" and its fork "mplayer2".

    --
    Still, I am not aware of any LLVM proprietary extension, placed in strategically vital position. So, there is no need for GPL-based LLVM fork.


    Quote Originally Posted by elanthis View Post
    then evil vile horrible proprietary companies
    This assumption is correct. They ARE evil and vile.
    Last edited by crazycheese; 11-05-2012 at 05:26 AM.

  8. #18
    Join Date
    Apr 2010
    Posts
    1,946

    Default

    Quote Originally Posted by yogi_berra View Post
    It embodies everything that is wrong with "free" software. From the idiotic bureaucracy of the steering committee to the horrible code documentation to the inability to address bugs in a timely manner to the rejection of bugfixes because of who wrote them.

    It's a bloated steaming pile of stuff even without the idiocy of gpl zealots that left people with a choice, fork gcc (again) or start a new compiler from scratch.
    Mr Gates, nothing is wrong with "free" software. It kicks your ass so high, you confuse closed source problems, which you listed above, with ones of the free software.

    Forking is quite normal, due to inability for *any* system define *perfect* build-up from ground up without starting.
    Those who question will look like idiots for a minute till answer. Those who not, will stay idiots forever.
    Modularity leads to deficiency in performance, one thing is faster than two+, even perfectly optimized multicores never achieve 100% performance of single core.
    Still, with size comes complexity and with complexity call for modularity.

    Regarding "GPL zealots", they fight for the freedom, so they are many times better than "Proprietary Sluts" such as yourself.

  9. #19
    Join Date
    Sep 2012
    Posts
    653

    Default

    Quote Originally Posted by crazycheese View Post
    1) first, newer project (LLVM) NOT using *any* GPL and instead picking up BSD license.

    BSD license is proven to be prioritized over GPL for single reason: BSD promotes closed source software.

    2) second, the name choosen is NOT "GCC" or anything related to "GCC". Compare to "Mplayer" and its fork "mplayer2".

    --
    Still, I am not aware of any LLVM proprietary extension, placed in strategically vital position. So, there is no need for GPL-based LLVM fork.
    1) BSD allows closed source software. Promoting would suggests that it is easier to write closed extensions on BSD code than open source extensions, which certainly isn't the case.

    2) the important word is "fork". mplayer2 is a fork of mplayer. LLVM does not reuse GCC code, nor any other GCC asset, so why on earth would it reuse the name? The name chosen is not icc either...

    --
    Ok so let's say there is a proprietary extension in LLVM, two cases:
    - open source developers can write the same thing. They write it, and continue to use LLVM. It costs them the same amount of work than if the project was GPLed.
    - open source devs cannot write the same thing. They don't, and they still couldn't have written it if the project was GPLed. Still the same situation as if the project was GPLed.
    The key aspect is that closed source components written to block other actors are never open sourced. Corporations in that position prefer to rewrite/buy elsewhere the whole thing anyway than make such sacrifices.

  10. #20
    Join Date
    Sep 2011
    Posts
    683

    Default

    Quote Originally Posted by erendorn View Post
    - open source developers can write the same thing. They write it, and continue to use LLVM. It costs them the same amount of work than if the project was GPLed.
    For a GPL licenced product it would either be released as open source of not made in the first place. So the same or better then non-GPLed.

    Quote Originally Posted by erendorn View Post
    - open source devs cannot write the same thing. They don't, and they still couldn't have written it if the project was GPLed. Still the same situation as if the project was GPLed.
    The project would have gone down a different path that didn't require this (probably because of copyright), or dropped long ago saving lots of waisted time. So better then the non-GPLed.

Posting Permissions

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