[LLVMdev] Last chance to get anything into llvm-c and ocaml bindings

Erick Tryzelaar idadesub at users.sourceforge.net
Fri Mar 5 17:18:33 PST 2010


On Fri, Mar 5, 2010 at 5:53 AM, George Giorgidze <giorgidze at gmail.com> wrote:
>
> Hi Erick,
>
> Can you make the following functions available in llvm-c.
>
> createStandardFunctionPasses
> createStandardModulePasses
> createStandardLTOPasses
>
> Thanks in advance, George

This is a little tricky, so I need some advice from the community.
First off, I'm not sure where it's appropriate to put these. For
llvm-c, most files live in a header named after the library that
includes the functions, and we don't have a corresponding place for
these functions. Perhaps they could go in a
llvm-c/Transforms/StandardPasses.h?

Second, createStandardModulePasses accepts an inlining pass an an
argument, but llvm-c doesn't expose a way to directly create any
passes. So, should I just not expose that argument, or should I add:

LLVMPassRef
LLVMCreateFunctionInliningPass
LLVMCreateAlwaysInlinerPass
LLVMCreatePartialInliningPass

But that seems silly just to expose those passes this way without all
the other passes and related functions. Does anyone have a better
suggestion?



More information about the llvm-dev mailing list