[LLVMdev] The OCaml Journal: first article on LLVM
Jon Harrop
jon at ffconsultancy.com
Mon Mar 10 05:30:14 PDT 2008
The OCaml Journal just published its first article on LLVM. This article
describes the basic use of LLVM for static and JIT compilation from OCaml
programs, including passing data from OCaml to run-time generated code and
the compilation of non-trivial expression trees (including control flow
constructs).
The OCaml Journal is available here:
http://www.ffconsultancy.com/products/ocaml_journal/?llvm
The ability to generate FFI code on-the-fly is one of the most interesting
aspects of LLVM from the OCaml perspective because OCaml's very static
compiler implementation currently requires interfaces to be predefined and
coded up manually as C stubs that are statically linked into an OCaml
executable. With OCaml, existing DLLs can be invoked using run-time generated
code, completely removing the need to write C stubs and allowing
interoperable OCaml programs to be completely self-contained. This exciting
application will be covered in detail in a future OCaml Journal article.
Many thanks,
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e
More information about the llvm-dev
mailing list