[LLVMdev] Improving OCaml bindings

Peter Zotov whitequark at whitequark.org
Sat Nov 2 18:04:54 PDT 2013


Hello folks.

I'm very interested in improving LLVM's OCaml bindings. I have
several nontrivial patches sitting on llvm-commits for several
weeks, and so far there's been little interest in them.

Could someone with a good understanding of OCaml please take
a look at these?

1) http://llvm-reviews.chandlerc.com/D1925

    Every other function in OCaml bindings accepts context
    explicitly, would it be a legitimate change to make existing
    functions accept it as well? This would break the API.

2) http://llvm-reviews.chandlerc.com/D1926

    I'd like to add garbage collection support to the API
    wherever safe, that's at least DataLayout.t and llmemorybuffer.
    This removes the need for .dispose. I could remove it and break
    the API or print a warning at runtime.

3) http://llvm-reviews.chandlerc.com/D1927

    In order to allow code generation from OCaml, I need to build
    a stub library per configured target. I'm not sure how to
    integrate it with LLVM's build system; my current solution seems
    very ad-hoc.

    I will update the patch to use Dynlink interface (this is the
    textbook use case for Dynlink), but conceptually this doesn't
    change the problem of interfacing with build system.

-- 
   WBR, Peter Zotov.



More information about the llvm-dev mailing list