Sunday, October 25, 2009

Journal 9, October 25

Article: LLVM 2.6 Released, Clang Is Now Production Ready

While it won't directly impact most people LLVM's latest release is a significant accomplishment. I think the feature that stands out the most is the vastly improved error messages which will help developers write better code faster. I have found from my own experience that a subtle error in a program can take far more time to figure out than writing the bulk of the program itself. I think that is often due to poor wording of errors or just plain not giving an error message.

In its latest iteration LLVM 2.6 offers production quality C and Objective-C support with speeds of upto 3 times faster during compilation than GCC4, which is the current standard compiler for many projects across a variety of operating systems, so developers can not only find bugs faster but rebuild their projects with fixes faster too.

Although LLVM which stands for Low Level Virtual Machine only fully supports C and Objective-C fully at the moment other projects are also making progress such as C++ support and even more unusual projects such as compiling php code with Roadsend PHP to native binaries for increased speed or in other words lower CPU requirements for heavily used websites.

What makes LLVM so desirable for many projects is the way it breaks the components down into modules so to add support for a new language to LLVM all that is needed is to write a front end for that language instead of having to write a complete compiler. And of course when your frontend is finished you also get the optimization from LLVM for free. The same goes for the backend if you wanted to add support for a new type of processor once the backend is complete you can compile code written in any language LLVM supports.

The push to use LLVM is huge with Apple already using it for optimization of their opengl graphics stack. FreeBSD and DragonFlyBSD are already actively working with the LLVM to get thier entire OS compiled with LLVM mostly due to better features than GCC and also more compatible licensing.

LLVM is for most people a behind the scenes change but those affect everyone as well. With its BSD like open source license which allows both open source contribution and also closed source modification it may even be adopted into commercial compiler suites as it becomes more stable. So if you need a headache free C/Objective-C Compiler or want to modify it for your own inhouse use check out LLVM!

Read all about it at llvm.org

No comments:

Post a Comment