[LLVMdev] Scheme + LLVM JIT

Chris Lattner sabre at nondot.org
Mon May 9 20:35:20 PDT 2005


On Thu, 5 May 2005, Alexander Friedman wrote:
>>>  Does there happen to be a C interface to the jit ? Our scheme impl
>>>  has a good FFI, but it doesn't do C++. If not, this is no big deal,
>>>  and i'll just write something myself.
>>
>> No, but such bindings would be *very useful*.  And since there might be
>> other people who need them this summer, such work might also get a lot
>> of help.
>
> I'll probably wind up writing one, and if I do, I will certainly
> submit it - it seems like it should just be gluing a bunch of
> functions together and proving an 'extern "C" ' decleration.
>
> What sort of interface should such an interface provide? The simplest
> is "pass-in-a-string-to-compile", but that's rather crude.

To me, the best interface is the most simple: I would suggest just 
wrapping the llvm classes and methods you need with simple functions, e.g.

llvm_function_new/llvm_value_set_name/llvm_executionengine_run_function, 
etc.

If kept simple, standardized, and generic, I think it would be very useful 
to people (even if incomplete).  This would allow others to build on it, 
and we could 'ship' it as a standard llvm library.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list