Hi everyone !<br><br>If I call ExecutionEngine::createJIT (or EngineBuilder::create) more than one time, the second time fails on a assertion "Multiple JIT resolvers?". <br>It seems that the JIT is designed to be a singleton in the process, and I was wondering if it was something mandatory.<br>
How hard will it be to make it a non-singleton object ? Is this a JIT-only problem (work needed on JIT classes only) ? Is it a much wider design constraint (on codegen ?) ?<br><br>In case, if you ask why I want to create more than one JIT, here is a reason : <br>
I have a JIT application which works fine, a thread is responsible to prepare code execution (work on module, add functions, optimize, call JIT...) and a another thread is responsible for executing the code produced in the first thread.<br>
It works great, but the preparation thread is heavily loaded. I decide to look at what happens, if I spawns 2 threads for preparation of the code.<br>I have a working prototype, which have one module and one context by thread, and it works. But the JIT is still shared between 2 threads and the time needed to emit a function is not negligible. It will be a great boost of performances, if I can create one execution engine by thread.<br>
<br>What do you think ? Do you have any comments on it ?<br>Thanks for reading !<br><br>Olivier.<br>