JIT slow

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JIT slow

Gonsolo
Hi!

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?

g
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: JIT slow

Gordon Henriksen-3
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?

Hi G,

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.

— G


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev