Clarifying what clang is
There are no "dynamically changing execution paths". clang is a C compiler like gcc. The LLVMLinux project makes changes to both clang/llvm and the kernel so that the kernel can be compiled with clang. The issue is that the kernel depends on a lot of gnu extensions to C which aren't necessarily supported by clang, and that both clang and the kernel are moving targets.
Originally Posted by Uqbar
The point of the project is to enable a choice of toolchains. Some people find clang an easier toolchain to work with, others like using the LLVM-IR to analyse code. Other people prefer the BSD license over the GPL. There are lots of reasons why clang/llvm are an interesting alternative to gcc. Personally I like the idea that competition between the toolchains means better features in both for all developers.
Originally Posted by erendorn
No one I know is interested in clang specifically for performance reasons. Though in general if you look at the phoronix benchmarks you can see that clang is better than gcc in some areas and worse in others. On average they currently perform similarly, though gcc has been optimized for many years, and clang is still relatively young with a lot more optimizations to come.
Like I said: toolchain competition is good for all developers.
Actually, most of our patches arguable make the code better. Certainly that is the feeling I've got from most kernel devs I spoken to. The LLVMLinux project is certainly trying to make the code better.
Originally Posted by Szzz
The only place where one might argue to the contrary is with Variable Length Arrays In Structs, and even in those situations the new code isn't that bad. The big problem with using VLAIS is that it is explicitly disallowed by the C standards. Using it actually dramatically affects all the code around it, and can make higher level compiler optimizations much harder to do. For instance, sizeof(struct_with_vlais) is no longer constant, and offsets to structure members of struct_with_vlais need to be dynamically calculated at run time. One could argue that changing the code to use flexible members (zero length arrays at the end of the struct) with some pointer math makes it much clearer what is actually going on.
One last thing. The URL to get to my slides in the article sadly is wrong. You can find them here: http://events.linuxfoundation.org/si...-LLVMLinux.pdf
Originally Posted by phoronix
If anyone has questions, please feel free to ask them on the LLVMLinux mailing list or OFTC #llvmlinux IRC channel.
Well that's not at all what I was talking about. I wondered about a gcc vs gcc comparison. With patches standard code versus gcc extension code.
Originally Posted by behanw