[LLVMdev] HLVM updated for LLVM 2.6

Jon Harrop jon at ffconsultancy.com
Tue Oct 27 14:05:18 PDT 2009


I have committed the changes to HLVM that bring it up to date with respect to 
the new LLVM 2.6 release:

  http://hlvm.forge.ocamlcore.org/

This required handling of llcontexts and the injection of a call to the new 
Llvm_executionengine.initialize_native_target function (that is undocumented) 
*before* the JIT EE is created, otherwise LLVM resorts to the LLVM 
interpreter which breaks at run-time because it does not fully implement the 
IR generated by HLVM.

I've also replaced the garbage collector with a more conventional in-heap 
mark-sweep GC. This makes HLVM 2.6x faster than before at allocating 
functional data structures but HLVM remains 10x slower than OCaml when there 
are many short-lived values (e.g. list-based 10-queens). My benchmark results 
indicate that the improvement most likely to give the largest performance 
improvement here would be the creation of a nursery generation (and not the 
removal of the shadow stack). HLVM still thrashes OCaml on numerical code, of 
course.

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e



More information about the llvm-dev mailing list