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--). -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***
On Nov 3, 2007, at 8:04 AM, Basile STARYNKEVITCH wrote:> 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?I'm not sure. I don't know of any that have switched to llvm.> Are there today some opensource programs which generate big LLVM > assembly files?The Mesa OpenGL stack is apparently switching to use LLVM. Also, llvm- gcc is opensource and produces large assembly files for large programs. It's hard to know exactly what you're asking for here... I suspect it comes down to having to benchmark the specific thing you're interested in to find out for sure. -Chris
Chris Lattner wrote:> On Nov 3, 2007, at 8:04 AM, Basile STARYNKEVITCH wrote: >> Are there today some opensource programs which generate big LLVM >> assembly files? > > The Mesa OpenGL stack is apparently switching to use LLVM. Also, llvm- > gcc is opensource and produces large assembly files for large programs. >For a rave (raving?) review of LLVM in Mesa, see: http://zrusin.blogspot.com/2007/11/gallium3d-llvm.html Adam -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20071104/677c94f8/attachment.sig>
For a mini functional language in LLVM see: http://groups.google.com/group/fa.caml/browse_frm/thread/8ba2204855fc5e46#5aee553df34548e2 AFAIK no major functional/logic implementations have moved to LLVM, but I'd be interested to hear to the contrary. Basile Starynkevitch wrote:> > 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? >-- View this message in context: http://www.nabble.com/performance-of-LLVM--tf4743242.html#a14176579 Sent from the LLVM - Dev mailing list archive at Nabble.com.
Possibly Parallel Threads
- [LLVMdev] performance of LLVM?
- [LLVMdev] open source multithreaded garbage collector suitable for LLVM applications?
- [LLVMdev] open source multithreaded garbage collector suitable for LLVM applications?
- [LLVMdev] open source multithreaded garbage collector suitable for LLVM applications?
- [LLVMdev] LLVM for JIT only use