LLVM 2.4 has been released. “LLVM 2.4 includes many bug fixes, much faster compile times at -O0, substantially better code generation in various cases, a new PIC16 target, new IR features, and numerous other improvements and features (see the release notes for details).” You can get it at the project’s download page.
I’ve tried the llvm-gcc bundled with XCode 3.1.1. So far there doesn’t seem to be much practical use for it. The compiler bombs when attempting to compile Qt4.4.3.
Anybody had any better luck? There has been claims that llvm-gcc produces code faster than vanilla gcc.
The llvm-gcc component is the most recent one and indeed it is known that it is good for medium sized project, while QT is quite a big one.
The great advantage of llvm is for creation and optimization of specialized languages, or in the various conditions in which glue code between components needs to be optimized.
From the LLVM 2.4 release notes:
By the way llvm-gcc is a supported compiler in Qt4 mkspecs.
Edited 2008-11-12 18:21 UTC
adkilla wrote:
–“Anybody had any better luck? There has been claims that llvm-gcc produces code faster than vanilla gcc.”
AFAIK llvm-gcc just uses gcc as a front end, the code optimization is all done by llvm. And yes, I’ve seen claims of better optimized code generation but I’ve yet to confirm it for myself (actually if anyone has some benchmarks or some such it would be very interesting). IIRC one of the authors of llvm claimed an overall 5%-10% speed increase in the generated code when compiling using llvm (which I personally think sounds almost too good) as compared to gcc. Of course both compilers are in heavy development and any such statements can be obsolete from day to day, but given that llvm is a relatively new project it’s likely alot easier to implement new modern optimization techniques into it’s codebase than into the much older and larger gcc toolchain which also has to make sure it doesn’t break since basically the entire oss world depends on it.
I can’t vouch for it’s overall useability as I’ve yet to try it out, but given that it consists of many components I suppose some are more mature than others. For instance I believe the jit compiler is being used in OSX’s opengl stack.
What’s the minimum gcc compiler allowed to compile Qt4.4.3?
The minimums are available here:
http://trolltech.com/developer/supported-platforms
Looks like gcc 3.4 and above should work.
This probably answers your question about the current viability of LLVM and it’s CLang project with Qt’s C++ Toolkit.
http://clang.llvm.org/cxx_status.html
clang is not llvm-gcc. Look at this comparison at the llvm site:
http://clang.llvm.org/performance.html
How could there be performance differences between clang and llvm-gcc if they are the same compiler?
Those performance figures are *compile* time not runtime.
Yes, that is what I was referring to. If the compilers are the same why are the comparisons between them show significant difference between them?