[LLVMdev] LLVM / C--
Bill Wendling
isanbard at gmail.com
Wed Nov 1 12:58:03 PST 2006
On 11/1/06, Guillaume FORTAINE <guillaume.fortaine at wanadoo.fr> wrote:
> >C--'s weakness is it's incompleteness (missing many major features),
> >instability/bugginess, poor performance (both time to compile and the
> >generated code), lack of high-level optimizations, lack of ABI
> >compatibility with the native tools, lack of C++ frontend support, and the
> >small size of its community.
>
> To quote Tony Hoare :
>
> "premature optimization is the root of all evil."
>
You are taking that quote out of context. Hoare is refering to people
who try to optimize their code before making sure that it runs
correctly, not an optimizing compiler (such as LLVM). (Of course, if
you don't want optimizations, simply use -O0 on the command line
during compilation.)
> Will we be able to retarget easily LLVM ?
>
> Has it a sense to retarget a compiler ?
>
Yes of course. It supports C, C++, and Objective-C. It also has many
different back-ends: PowerPC, X86, X86-64, Alpha, ARM, etc. And it has
many target-independent optimizations.
> "In order" or "out of order" :The programmers do/ do not learn to optimise
> their algorithms... Who does what ? :)
>
I don't follow...What does this have to do with an optimizing compiler?
> And why doesn't LLVM use lcc instead of gcc ?
>
LCC's front-en is not as full-featured as GCC's front-end. In
particular, it doesn't have C++ or Objective-C support. And, note,
that GCC is *only* used as the front-end (i.e., parser) in LLVM.
-bw
More information about the llvm-dev
mailing list