Edwin wrote: > On Sun, 12 Dec 2010 22:05:34 -0000 > Jon Harrop <jonathandeanhar...@googlemail.com> wrote: > > Edwin wrote: > > > AFAICT LLVM's OCaml bindings are only good for generating LLVM IR > > > from OCaml, not for actually performing transformations on it > > > (there is no binding to retrieve the type of a value for example). > > > I'll probably be looking into fixing that in the near future, and > > > this may indirectly help your LLVM backend (if you intend to write > > > OCaml specific transformations on the LLVM IR). > > > > That's a lot of work. Wouldn't it be preferable to do the passes on > > the OCaml side and focus on generating high quality LLVM IR? > > Yes, that is probably a better approach (generating the optimized IR in > the first place).
FWIW, just the basic existing bindings were still buggy last I looked. For example, HLVM had to use a workaround to add a dummy argument to a function with no arguments because the bindings didn't handle that case correctly. Ironing the bugs out of the existing bindings would be more useful than making them even bigger, IMHO. Going back to Richard's idea, writing an OCaml library that uses LLVM to JIT interface code on-the-fly as a replacement for writing separate C stubs would be incredibly useful and you could even use it to interface to LLVM itself more easily! Cheers, Jon. _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs