There were in fact at least two serious attempts at a LLVM port: - one by Colin Benner, https://github.com/colinbenner/ocamlllvm http://oud.ocaml.org/2012/abstracts/oud2012-paper7.pdf (the paper above briefly discusses GC issues) - one by Raphaƫl Amiard, https://github.com/raph-amiard/CamllVM https://www.irill.org/blog/camllvm-a-llvm-based-runtime-for-ocaml (in the spirit of University Pierre et Marie Curie, this compiler goes from OCaml bytecode to LLVM programs, instead of being a harder-to-deploy native-code compiler backend) Both cited the GC interface and the slowness of exceptions (relative to the exceptionnally fast OCaml runtime exception handling on which many programs rely). These difficulties had been correctly foreplanned by Xavier Leroy in his 2009 caml-list message http://caml.inria.fr/pub/ml-archives/caml-list/2009/03/3a77bfcca0f90b763d127d1581d6a2f1.en.html There has been recent developments on the GC support front in the LLVM community, notably the work of Philip Reames on "statepoints" as an alternative approach to GC support (that should support eg. passing roots in registers): http://www.philipreames.com/Blog/2014/10/21/statepoints-vs-gcroot-for-representing-call-safepoints/ Regarding exceptions, I would guess a necessary evil would be to do more static analyses inside the OCaml backend to detect when exception usage can be refined to less generic constructs (eg. the experiments of Alain Frisch on "static raise": https://www.lexifi.com/blog/static-exceptions ). Degraded exceptions are also a source of performance issues on other backends such as js_of_ocaml. On Sat, Jul 11, 2015 at 2:47 AM, Raoul Duke wrote: > > Targeting LLVM or GCCJIT is an interesting but separate project. > > At least one attempt were made in the past to target LLVM, running into > > problems with the (exact) GC interface of OCaml. Maybe LLVM improved > > recently in this department, and maybe GCCJIT can handle it too. If > > not, I think it's a dead end. > > > For posterity, and for the sake of curiosity, might someone in the > know succinctly explain what the (exact) GC interface road blocks > were? Thank you! > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >