--enable-optimized
Enables optimized compilation (debugging symbols are removed and GCC optimization flags are enabled).
Note that this is the default setting if you are using the LLVM distribution. The default behavior of an
Subversion checkout is to use an unoptimized build (also known as a debug build).
GCC has a lot of momentum, but at some point LLVM should start gaining mind share among compiler researchers. Who really wants to work with the GCC code?
>>12
This more than anything else. Hell, if compilation takes so long as to be noticeable, just let it run while you're at the store or sleeping or whatever.
>>26
They target C/C++ programmers. This is stupid, since established native compilers which don't need a vm/bytecode can outperform them easily(unlike VM languages)
>>29
If you've seen the kind of shit that the FSF pulls in its management of GCC, you'd welcome a different organization, even Apple, backing your compiler of choice. The FSF sabotages the modularity of GCC out of ideological devotion to the GPL. Why does GCC have no accessible intermediate language? Because then someone could write a closed-source frontend, backend, or optimization stage for it. GCC is an utter piece of shit if you want to try and add support for new languages or platforms.
Name:
Anonymous2010-07-27 11:36
Linuxare: To what extent does the basic architecture of GCC need changes to support the language front-ends, such as the new GCC Java compiler?
Richard: I don't know anything about what's happening with the Java compiler. I stopped dealing with GCC around 1992 and I don't know what changes, if any, were needed. Some changes were needed mainly in the tree data structure, which is what programs get parsed into. Occasionally, when you handle a language that has the kind of construct that hasn't been handled before, if there's no way to represent it with the existing tree data structure, you need to add something so you can represent it. Things like methods and core methods needed a way to be represented, so we added them.
Linuxcare: Does GCC still use a LISP-like intermediary language?
Richard: Printed syntax is what's LISP-like. It's not really LISP-like in the sense that it consists of tupelos that point to a number of other tupelos, which is not by any means a new format for priority use. It's printed out in a LISP-like syntax because that makes it easy to work with in EMACS.
Linuxcare: How did you come to choose LISP as the EMACS engine?
Richard: LISP is the most powerful programming language, and if you want an interpreter, LISP is the best. None of the other languages come anywhere near LISP in their power. The most exciting things about LISP are read, eval, and print. If you look at other languages, they have no equivalent for any of those.
The most exciting things about LISP are read, eval, and print. If you look at other languages, they have no equivalent for any of those.
JavaScript: prompt, eval, alert
Perl: <>, eval, print
>>38
You are very wrong. Either you are trolling, or you have no idea how Lisp works.
read parses a line of input into an s-expression. It does not return a string. eval evaluates an already-parsed s-expression. It does not operate on strings. print outputs an s-expression. It does not process strings. (That is, (print "hello") will output "hello" with the quotation marks intact.)
>>49
That's right. GCC works and is adequate. Certain metrics may compare worse to other compilers and that's fine to me. If I require something specific, I can get GCC fixed to meet that requirement.
>>51
How about adding support for a new language to GCC? That, sir, is an utter PITA. LLVM exposes its back end to anyone who wants to use it. (Insert anal sex joke here.)
Also, gcc had a decade head start. Since LLVM's backend isn't intentionally obfuscated like gcc's and uses a clean IR that's especially designed to facilitate optimization, it will eventually overtake gcc in speed and reliability.
Name:
Anonymous2010-08-03 6:28
LLVM isn't worse than GCC. If you build it for release mode and use the Clang front-end, it's both a faster compiler and generates much faster code (granted that you build native machine executables, not LLVM bytecode executables).
The fact that you claim otherwise just shows that you're an amateur.
GCC also really sucks at ARM code generation still after all of these years, and Clang/LLVM is really shining here. I recently came up with a fast 3-term cross-product using NEON intrinsics.
GCC still wins at general program speed(big programs not benchmarks).
IIRC llvm incurs 15-10% speed loss vs GCC in most of them(and about -10% more if we compare with Intel C++ which has somewhat better optimizer).