[LLVMdev] Eager JIT

Nicolas Capens nicolas at capens.net
Mon Jul 7 06:08:54 PDT 2008


Hi all,

 

Is there any way to generate the binary code for a whole module at once?
Currently I always get lazy compilation one function at a time.

 

The reason I would like to generate the whole module at once is because I
create some functions at run-time and then minimize the memory footprint by
deallocating all LLVM objects. I've written my own JITMemoryManager to
ensure that the binary code itself does not get deleted. Unfortunately, with
lazy compilation the stub tries to call an LLVM method while everything else
has already been deleted.

 

It looks like JIT::getPointerToFunctionOrStub is responsibe for creating the
stubs, and I've tried overloading it to emit the function instead of a stub,
but unfortunately the JIT class has a private constructor, making it
impossible to create a derived class.

 

Is there any other way to achieve this without changing LLVM code? Or does
this sound like a feature worth adding to LLVM itself?

 

Thanks a lot,

 

Nicolas Capens

 

P.S: MSVC users, please comment on my previous e-mail "MSVC solution
relative paths". Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080707/4910fd9c/attachment.html>


More information about the llvm-dev mailing list