[LLVMdev] llvm ocaml bindings

Erick Tryzelaar idadesub at users.sourceforge.net
Tue Dec 30 06:35:35 PST 2008


(ccing llvmdev) Hi Ranjit! I only ported Chris's tutorial and Gordon
did the vast majority of the    bindings, so they deserve most of the
praise. I believe there are techniques for walking over the CFG. You
can load up code using Llvm_bitreader, use things like
Llvm.iter_globals, Llvm.iter_functions, and Llvm.iter_instrs to walk
over the module, and write out a new llmodule using Llvm_bitwriter. Is
there something more specific you want to do?

On Mon, Dec 29, 2008 at 6:05 PM, Ranjit Jhala <jhala at cs.ucsd.edu> wrote:
> Hi Erick --
>
> many thanks for writing the ocaml bindings and tutorial for LLVM !
>
> I had a question: i see there are bindings for _generating_ code, but are
> there also bindings for _reading_ code (e.g. visitors that go over CFG do
> different things depending on the kinds of instructions ?)
>
> Thanks!,
>
> -Ranjit.
>
>



More information about the llvm-dev mailing list