[LLVMdev] JIT slow
gordonhenriksen at mac.com
Thu Mar 15 09:30:42 PDT 2007
On 2007-03-15, at 11:42, Gonsolo wrote:
> It appeared to me that runFunction in JIT.cpp is slow for
> repeatedly executing the same function with nontrivial arguments
> since the "Stub" function in JiT.cpp:183 (LLVM 1.9) is compiled
> again and again. Is there something I can do to accelerate this?
Have you tried using this method instead?
/// getPointerToFunctionOrStub - If the specified function has been
/// code-gen'd, return a pointer to the function. If not, compile
it, or use
/// a stub to implement lazy compilation if available.
virtual void *getPointerToFunctionOrStub(Function *F);
If you can use it, this eliminates out the overhead in question,
reducing it to an indirect function call.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev