|
|
Subscribe / Log in / New account

Stallman on GCC, LLVM, and copyleft

Stallman on GCC, LLVM, and copyleft

Posted Jan 25, 2014 0:04 UTC (Sat) by jgg (subscriber, #55211)
Parent article: Stallman on GCC, LLVM, and copyleft

If you haven't used the latest release of clang you should give it a go. It really is very good, and it is hard to see where it falls down compared to gcc at all. Especially the C++ support with their from-scratch standard library is very good and clean.

The add on tools like clang format and the modernizer are useful and very much unique.

Sadly it provides the missing element to give Emacs the sort of incredible code-context-sensitive 'tags' and other features that things like XCode and Visual Studio have had for years. The sort that is only possible if you strongly couple Emacs and clang's libraries. I guess based on these comments that will never happen :(

Unfortunately I think the main thing that has kept gcc going for so long was that it was the compiler code base of choice (out of necessity, not sanity) for research level compiler projects. It is hard to see how that would be true going forward when clang/llvm is so much more accessible to that community.


to post comments

Stallman on GCC, LLVM, and copyleft

Posted Jan 25, 2014 7:36 UTC (Sat) by patrick_g (subscriber, #44470) [Link] (3 responses)

> If you haven't used the latest release of clang you should give it a go. It really is very good, and it is hard to see where it falls down compared to gcc at all.

Performances.
The gap is still huge. See this post : http://gcc.gnu.org/ml/gcc/2014-01/msg00230.html

Stallman on GCC, LLVM, and copyleft

Posted Jan 25, 2014 17:34 UTC (Sat) by duvelb (guest, #95199) [Link]

Indeed! The clang "vectorizer" chokes on anything that's slightly harder to digest: http://llvm.org/bugs/show_bug.cgi?id=16358. Reported against clang 3.3, but clang 3.4 is no better.

Stallman on GCC, LLVM, and copyleft

Posted Jan 27, 2014 3:51 UTC (Mon) by jgg (subscriber, #55211) [Link] (1 responses)

That posting only shows a 8% gain in gcc on 64 bit architectures (and something wonky for 32 bit), not exactly a huge difference... Intel's C compiler also handily beats both in certain math/vector heavy benchmarks, while I have personally seen clang produce better assembly than gcc in some specific cases.

The reality is that they are close enough now that many users won't care or notice.

Stallman on GCC, LLVM, and copyleft

Posted Jan 20, 2015 12:28 UTC (Tue) by pbonzini (subscriber, #60935) [Link]

8% is huge for a compiler. Proebsting's law ("Moore law for compilers") jokingly says that "improvements to compiler technology double the performance of typical programs every 18 years". But it is not far from reality (http://www.cs.virginia.edu/~techrep/CS-2001-12.pdf), and 8% is approximately 2 years of work (1.08^9 = 2).

Stallman on GCC, LLVM, and copyleft

Posted Jan 25, 2014 9:37 UTC (Sat) by coriordan (guest, #7544) [Link]

> it is hard to see where it falls down compared to gcc at all

The licence.

> give Emacs the sort of incredible code-context-sensitive 'tags' and other features

There's some discussion on emacs-devel about how to get this through GCC. It might be a lot of work.

Stallman on GCC, LLVM, and copyleft

Posted Jan 25, 2014 12:09 UTC (Sat) by suy (guest, #81959) [Link] (3 responses)

I am quite surprised of reading that Emacs doesn't have such support, since even Vim, with it's bad support for asynchronous task (only through complex hacks) has several plugins that interact with clang or libclang to provide completion and more.

Stallman on GCC, LLVM, and copyleft

Posted Jan 25, 2014 23:49 UTC (Sat) by deepfire (guest, #26138) [Link] (2 responses)

Why, sure emacs has it -- https://github.com/Golevka/emacs-clang-complete-async is one of them - I think I remember seeing others on ELPA.

Stallman on GCC, LLVM, and copyleft

Posted Jan 26, 2014 14:22 UTC (Sun) by jwakely (subscriber, #60262) [Link]

Yes, I think the debate was over whether to include something like that in the official emacs repo, rather than as a third-party thing.

Stallman on GCC, LLVM, and copyleft

Posted Jan 27, 2014 3:57 UTC (Mon) by jgg (subscriber, #55211) [Link]

There are actually several attempts at integration with various degrees of success.. But non are officially supported by emacs - and IMHO the trouble with these schemes is that emacs itself doesn't have great core support for the kind of UI you'd want to create once you have realtime context sensitive code parsing.

Nobody will work on the core support if there is no supportable back end module :(

Stallman on GCC, LLVM, and copyleft

Posted Jan 25, 2014 12:15 UTC (Sat) by ballombe (subscriber, #9523) [Link]

> it is hard to see where it falls down compared to gcc at all
Architecture support ?


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds