Quote:
Check out a nice detailed benchmark here. |
that's why llvm is also good for gcc
http://gcc.gnu.org/ml/gcc/2012-03/msg00256.html http://gcc.gnu.org/ml/gcc/2012-03/msg00263.html |
Free BSD 10 To Use Clang Compiler, Deprecate GCC, link.
Maybe there is some important advantage of LLVM on top of GCC. |
Quote:
|
From what I read in the Phoronix forum the bitcode compiled by clang is 5-15% slower than the same code compiled with GCC without optimizations.
Clang is not a mature yet. |
I'm delighted that LLVM was included with the new X updates in current. I've been watching this project for several years wondering if it would ever come into more general acceptance.
"GCC vs LLVM"??? I don't get it. To me they are very different tools. Yes, LLVM has a compiler--so does Perl. To me, the compiler in LLVM has more in common with the Perl compiler than with GCC. The LLVM compiler targets the Low Level Virtual Machine, just as the Perl compiler targets the Perl runtime. The only differences I see are that the LLVM compiler compiles C and the Perl compiler compiles Perl, and the LLVM operates more closely to the hardware than the Perl runtime does. GCC directly targets a variety of hardware. LLVM targets a VM layer that can make compiled code more portable. Apples and Oranges in my book. |
Sorry, but that's far from being accurate at all. GCC has front-ends to different languages, and backends to multiple architectures. When the frontends run, they translate the code to an intermediate language or virtual machine, if you prefer, like RTL. GCC and LLVM, in that sense, work very similarly. Of course, internally they're very different, but just not in that concept.
http://en.wikipedia.org/wiki/Interme...uage#Languages http://en.wikipedia.org/wiki/Register_Transfer_Language |
also, for historic reasons and for different optimization steps gcc employes a variety of internal representations of the code. of course, this doesn't help performance very much.
|
Quote:
How GCC works internally isn't the point. The output is raw machine code. LLVM's compiler outputs bytecode to run on top of the LLVM, rather like the .Net languages which can't run without .Net LLVM just has a much lower level of abstraction and so, can run much faster. |
Quote:
Code:
gazl@darkstar:/tmp$ cat >clang-test.c |
All times are GMT -5. The time now is 04:58 AM. |