[LLVMdev] Reading Instructions from Ocaml

Erick Tryzelaar idadesub at users.sourceforge.net
Mon Jun 13 19:11:38 PDT 2011


On Mon, Jun 13, 2011 at 12:09 PM, Gregory Malecha <gmalecha at gmail.com> wrote:
> Hello,

Hello Gregory,

> I'm interested in the OCaml bindings, but I've been digging through them and
> it doesn't seem possible to actually write a transformation with them.
> Specifically, there are a lot of functions to build each type of
> instruction, but there doesn't seem to be any way to query an llvalue and
> determine what kind of instruction it is. Is there something that I am
> missing?

Unfortunately you'll have to write your transformations in C++. That
functionality is purposely left unexposed in order to keep the llvm-c
API stable, and allow the C++ API to evolve over time.



More information about the llvm-dev mailing list