Hello All,
I suspect that LLVM performs very well, mostly because I respect a lot his main architect Chris.
However, I have no ideas about concrete performance of the LLVM compiler, in particular speed of the compilation process to achieve small optimisation (mostly something equivalent to gcc -fPIC -O1 in terms of code quality). The intent is to generated .so files (I want to avoid the LLVM JIT stuff because linking in the LLVM compiler is huge, and handling the LLVM representation may be more difficult than printing LLVM assembly file).
I know my question is a bit vague, but to make it more precise, assuming one generate either low level C code or LLVM assembly code (or perhaps C-- code, all these are somehow similar) from a higher level stuff (think of some Scheme -> C or Prolog -> C compiler or Mercury -> C compiler).
The typical style of the generated code could be something in a "GIMPLE" style in all cases. So each instruction is either some simple arithmetic, or some simple test, or one call (but no nested call).
My intuition is thus that in order to achieve rather good compilation time and not bad runtime behavior of the generated code, compiling (with LLVM) generated LLVM assembly should be quicker than compiling the equivalent generated low level C code.
In other words, are there some successful code "generators" (ie high level compilers for either functional or logical languages) which actually did switch from generating C code and compiling it (with GCC) to generating LLVM assembly and compiling it (with LLVM)? What are the concrete improvements (in compilation time by LLVM or GCC, and in code generation time) they observed?
Are there today some opensource programs which generate big LLVM assembly files?
NB: in this email, a code generator means actually a complex program which transform a high level language (Prolog, Haskell, Scheme, ...) into a lower level one (C or LLVM assembly or C--).