[llvm-dev] Reuse llvm::ExecutionEngine
preejackie via llvm-dev
llvm-dev at lists.llvm.org
Tue May 7 06:27:46 PDT 2019
Could you please give me a minimal code sample to produce this behavior?
On 07/05/19 5:17 PM, Gaier, Bjoern via llvm-dev wrote:
> Dear LLVM-Mailing-List,
> I’m using the llvm::EngineBuilder to create an instance of the
> llvm::ExecutionEngine, I then JIT my code, take the addresses I need
> and delete the llvm::ExecutionEngine. But now I started to wonder, if
> I could reuse that instance for a new module again?
> I first tried calling llvm::EngineBuilder without setting a Module, I
> planned to add it later – but when I do this the “create” function
> will crash.
What crash you get? By quickly looking through interface, EngineBuilder
uses nullptr if no module are provided.
> Another test I ran was calling “removeModule” of the
> llvm::ExecutionEngine after the call to finalizeObject. Then I added
> the same module again and ran finalizeObject again. The result was
> weird, I suddenly became error messages about the relocation – I take
> this came because I applied a memory mapping in the first run.
> So to make it short: Is the llvm::ExecutionEngine designed for a reuse
> or is it better to create a new instance again?
> Kind greetings
> Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816,
> USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr.
> Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi
> Fukushima. Junichi Tajika
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
Have a great day!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev