[LLVMdev] Question about reusing executable object memory get from MCJIT->getPointerToFunction
lhames at gmail.com
Wed Oct 15 19:57:02 PDT 2014
If your underlying ExecutionEngine is MCJIT then I *think* you will be able
to get away with calling that memory as long as your RTDyldMemoryManager
instance is still alive. Like a lot of JIT semantics though, this isn't
codified anywhere. I would be be wary of relying on it. My take is that
once the ExecutionEngine is gone, the JIT'd code should no longer be called.
On Tue, Oct 14, 2014 at 12:01 PM, Cheng Zhu <chengzhu at gmail.com> wrote:
> Hi, All
> Can we still use the compiled executable object even if module and
> execution associated with it are already gone? It looks like for the
> same function I am able to reuse the executable object storage
> obtained from the previous getPointerToFunction even if the module and
> execution compiling that function have already been deleted. My
> understanding is that those storage containing executable instruction
> from finalizeObject and getPointerToFunction are associated with
> module and execution engine, if module and EE are deleted, those
> storage are void and we should not use them again.
> Am I right and I am just luck that those storage haven't been deleted yet?
> Best regards
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev