I played with LLVM for many months. I have written two articles of the OCaml Journal on the use of LLVM from the OCaml programming language. This is especially interesting because the OCaml language is ideal for writing compilers and has many powerful and mature parsing tools and libraries, etc.
All in all, my experience has been extremely positive. LLVM does what it says on a tin tape and is very easy to use. The performance of the generated code is excellent. One of the programs I wrote was a simple small Brainf * ck compiler that generates some of the fastest executable files of any tested compiler (including GCC).
I have only two problems with LLVM. First, it uses abort () whenever something goes wrong, instead of throwing an exception. It was a deliberate design decision by its authors, who seek to remove all applications of exceptions from LLVM, but it makes it impossible to get backtracks from OCaml when trying to debug a compiler that uses LLVM: your program just dies with a text explanation from LLVM but donโt know where it happened error in your source. Secondly, the LLVM compiled library is monstrously large (20Mb). I assume this is due to the bloat caused by C ++, but this makes compilation difficult.
EDIT: My work on LLVM resulted in a high-performance virtual machine with a high level of garbage collection. Download here and check the related tests (wow!). @Alex: I will get this BF compiler for you somewhere as soon as possible.
Jon Harrop Nov 22 '08 at 7:22 2008-11-22 07:22
source share