[LLVMdev] JIT, FFI

Reid Kleckner rnk at mit.edu
Wed Oct 28 08:21:21 PDT 2009


Ouch, I see what you mean.  It seems this bug can be fixed by freeing
the stub function and it's associated machine code before returning
from runFunction.  You should file a PR about it.

Reid

On Wed, Oct 28, 2009 at 10:41 AM, Christian S. Perone
<christian.perone.listas at gmail.com> wrote:
> Hello, I'm new to LLVM and I had a question about it: when we call the
> JIT::runFunction, since llvm doesn't has a full FFI, there are some cases in
> which the JIT needs to codegen a stub function to call the function we are
> interested, my question is: this stub function will remains in the module
> until when ? What are the most efficient way to remove it from the module
> and memory ? For a little quantity of calls this doesn't matter, but when I
> call a function using "runFunction" let's say 100 times with differente
> arguments, it will create 100 function stubs.
>
> Thank you !
>
> --
> Christian S. Perone
> http://pyevolve.sourceforge.net/wordpress
> "Forgive, O Lord, my little jokes on Thee, and I'll forgive Thy great big
> joke on me."
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>




More information about the llvm-dev mailing list