Linked by Thom Holwerda on Thu 7th Oct 2010 19:10 UTC, submitted by tyrione
General Development LLVM 2.8 has been released. The release notes describe this new, ehm, release in greater detail, so head on over and give it a read.
Thread beginning with comment 444418
To read all comments associated with this story, please click here.
GCC > LLVM
by tuma324 on Thu 7th Oct 2010 22:04 UTC
tuma324
Member since:
2010-04-09

GCC is still the best.

Reply Score: 0

RE: GCC > LLVM
by 0brad0 on Thu 7th Oct 2010 23:35 in reply to "GCC > LLVM"
0brad0 Member since:
2007-05-05

GCC is still the best.


Far from being "the best".

Reply Parent Score: 3

RE: GCC > LLVM
by Drumhellar on Thu 7th Oct 2010 23:38 in reply to "GCC > LLVM"
Drumhellar Member since:
2005-07-12

Based on what metric?

I'm not saying it isn't, as GCC is a very mature and robust compiler suite, with many many years of development behind it, but I'm sure it isn't better in every metric.

Unless you're trolling, in which case, MSVC is better than GCC.

Reply Parent Score: 2

RE[2]: GCC > LLVM
by Valhalla on Fri 8th Oct 2010 03:56 in reply to "RE: GCC > LLVM"
Valhalla Member since:
2006-01-24

Based on what metric?


Sure hope it's not about licences, I'm so tired of that.

From my own tests and from what I've read of others GCC still generates the fastest code, that is even without optimizations such as PGO which llvm lacks, however clang/llvm compiles quite a bit faster (sure, some of it may have to do with not optimizing quite as well as gcc) and the error reporting is imo superior.

The great thing is that clang adopted gcc's flags etc so it should work as a drop-in replacement. And as such there's no need for anyone to put all their eggs in one basket, not even on a per project basis. You can (or atleast will be able to once clang has sufficient compability) use them interchangeably and harness the strenghts of each compiler where it suits you.

Reply Parent Score: 3

RE[2]: GCC > LLVM
by lemur2 on Fri 8th Oct 2010 05:00 in reply to "RE: GCC > LLVM"
lemur2 Member since:
2007-02-17

Based on what metric? I'm not saying it isn't, as GCC is a very mature and robust compiler suite, with many many years of development behind it, but I'm sure it isn't better in every metric. Unless you're trolling, in which case, MSVC is better than GCC.


Well, GCC is a compiler collection (which is what the CC stands for). GCC has a fair number of supported languages and target architectures.

http://en.wikipedia.org/wiki/GNU_Compiler_Collection#Languages

http://en.wikipedia.org/wiki/GNU_Compiler_Collection#Architectures

In contrast, LLVM front ends actually appear to come from GCC:
http://en.wikipedia.org/wiki/Low_Level_Virtual_Machine#Front_ends

... whereas I can't find any information on what machine architectures are supported, so I would presume it is only x86 and x86_64.

So in terms of at least the metric "what it supports", GCC takes quite some beating.

Reply Parent Score: 2

RE: GCC > LLVM
by tylerdurden on Thu 7th Oct 2010 23:54 in reply to "GCC > LLVM"
tylerdurden Member since:
2009-03-17

Trolling about compilers, seriously???

Reply Parent Score: 2

RE[2]: GCC > LLVM
by smitty on Fri 8th Oct 2010 01:49 in reply to "RE: GCC > LLVM"
smitty Member since:
2005-10-13

Trolling about compilers, seriously???

More like trolling about licenses. GCC vs LLVM has become a BSD vs GPL proxy flamewar in some circles.

Reply Parent Score: 3

RE: GCC > LLVM
by 0brad0 on Fri 8th Oct 2010 07:01 in reply to "GCC > LLVM"
0brad0 Member since:
2007-05-05

GCC is still the best.


GCC is a slow compiler, especially with C++ and it's getting slower with each new release. It is a memory pig. Error messages/reporting is very poor. The code is overly complex and hard for people to hack on. The license especially with the newer versions is unacceptable for a lot of projects.

LLVM is much better in all of these areas.

GCC also does not generate the best code on pretty
much any architecture and on more than enough of the architecures it supports it generates really poor code.

Reply Parent Score: 1

RE[2]: GCC > LLVM
by RshPL on Fri 8th Oct 2010 11:09 in reply to "RE: GCC > LLVM"
RshPL Member since:
2009-03-13


GCC also does not generate the best code on pretty
much any architecture and on more than enough of the architecures it supports it generates really poor code.

Can you somehow back up this claim?

From my experiences Mingw-GCC on Windows with O3 generates MUCH faster code than MSVC (dunno about 2010 though). I've done some numeric computations benchmarks.

Reply Parent Score: 2

RE[2]: GCC > LLVM
by Valhalla on Fri 8th Oct 2010 20:06 in reply to "RE: GCC > LLVM"
Valhalla Member since:
2006-01-24

and it's getting slower with each new release.

Ehh? Not nearly so, I really want to think this is not about you being a BSD fan and gcc being GPL, please say it's not so.

Error messages/reporting is very poor.

Here's where I kind of agree with you, except that I don't think it's 'very poor' but rather that llvm's is 'very good', as in best of class. It's one of the things I personally would want the gcc devs to work on, but although there are plans on this ( http://gcc.gnu.org/wiki/Better_Diagnostics?action=fullsearch&contex... ) the corporations that to a large extent directs gcc's focus (ibm, red hat, novell etc) are obviously prioritizing optimizations as it stands with the focus of gcc 4.6 being that of polyhedral optimizations. Nothing wrong with that, certainly there's alot of performance to be had, as shown by pocc for example: http://www-roc.inria.fr/~pouchet/software/pocc/ but again I'd rather prefer it if they put the optimizations aside for a whlie and worked on the diagnostics.

Reply Parent Score: 2

RE: GCC > LLVM
by fithisux on Fri 8th Oct 2010 12:22 in reply to "GCC > LLVM"
fithisux Member since:
2006-01-22

Maybe in terms of code generation, but adding a frontend to gcc at first sight seems a nightmare in comparison to llvm (I am a fan of stallman/GPL). I hope they change it or prove me wrong. Switching to C++ sounds interesting and possibly rewarding.

Reply Parent Score: 2

RE: GCC > LLVM
by nt_jerkface on Fri 8th Oct 2010 17:41 in reply to "GCC > LLVM"
nt_jerkface Member since:
2009-08-26

Best at what? I thought it was common knowledge that icc is better for performance.
http://multimedia.cx/eggs/icc-vs-gcc-smackdown-round-3/

GCC is of course more portable but I wouldn't call it the best.

Reply Parent Score: 2

RE[2]: GCC > LLVM
by jacquouille on Fri 8th Oct 2010 17:51 in reply to "RE: GCC > LLVM"
jacquouille Member since:
2006-01-02

Best at what? I thought it was common knowledge that icc is better for performance.


Outdated common knowledge, then. GCC has improved very fast for the past 5 years now in the performance area, and simultaneously the nature of compiler optimization has shifted: 5 years ago it was mostly about the back-end carefully selecting asm instructions, which ICC is very good at, but nowadays programmers of performance-critical software use more and more intrinsics (especially for SIMD) so to a large extent they control that themselves. In other words, ICC's superiority in the area of auto-vectorization is becoming irrelevant as that doesn't get nearly as good as intrinsics-based vectorization anyway. Instead, compiler optimization has been moving to a larger scale, with e.g. the advanced loop transformations (polyhedral model) introduced in gcc 4.4, with partial loop unrolling, partial function inlining, better constants propagation, etc.

Reply Parent Score: 3

RE: GCC > LLVM
by danieldk on Sat 9th Oct 2010 10:32 in reply to "GCC > LLVM"
danieldk Member since:
2005-11-18

According to what criterium? llvm, clang, etc. make it a whole lot easier to add IDE plugins, write debuggers, static analysers, etc.

Every compiler has it's strengths and weaknesses. E.g., compile a very large array of structs. gcc will become a monstrosity, taking enormous amounts of memory, while VC++ effortlessly compiles it in a VM with only 512MB RAM.

It's not exactly clear-cut. But the fact is that gcc until recently didn't have a decent system for plugins to avoid proprietary plugins, and LLVM has forced them to offer such functionality to compete.

Edited 2010-10-09 10:32 UTC

Reply Parent Score: 2

RE[2]: GCC > LLVM
by Neolander on Sat 9th Oct 2010 10:58 in reply to "RE: GCC > LLVM"
Neolander Member since:
2010-03-08

According to what criterium? llvm, clang, etc. make it a whole lot easier to add IDE plugins, write debuggers, static analysers, etc.

Every compiler has it's strengths and weaknesses. E.g., compile a very large array of structs. gcc will become a monstrosity, taking enormous amounts of memory, while VC++ effortlessly compiles it in a VM with only 512MB RAM.

It's not exactly clear-cut. But the fact is that gcc until recently didn't have a decent system for plugins to avoid proprietary plugins, and LLVM has forced them to offer such functionality to compete.

Indeed. LLVM is something nice, be it only because it pushes innovation forward in areas which GCC traditionally doesn't explore (internal structure, error messages, plug-ins...).

However, I'm not sure the memory and resource consumption of LLVM is a good argument. Currently, LLVM optimizes code much less than GCC implementations (at least on the tests provided here). Chances are that to optimize code as much as gcc -O3 (or maybe the new -Ofast, not sure what it actually does), LLVM could require much more memory than it currently does.

Edited 2010-10-09 11:17 UTC

Reply Parent Score: 2