Wednesday, 26 November 2008

LLVM 2.4 released

Developers of the compiler framework LLVM are sticking to a rapid release schedule, shipping the latest 2.4 version of LLVM. This includes extensive OCaml bindings that can be used to generate arbitrary native code at run time.

OCaml and LLVM form a powerful team that can be of mutual benefit in many different ways. Firstly, the OCaml language is derived from a family of languages that were specifically designed for manipulating programs and writing compilers. So OCaml is ideally suited for this task and many LLVM users stand to gain a lot by writing their high-level code (particularly front-ends) in OCaml. Secondly, the current OCaml implementation can be improved in many different ways using LLVM. One alluring project is the creation of an automated FFI for OCaml that uses run-time generated code to interface to existing native code libraries with a minimum of fuss by eliminating the impedance mismatch between the OCaml and C type systems and representations.

Using LLVM from OCaml has been the topic of two OCaml Journal articles already this year.

No comments: