orc vs mcjit

Which llvm version is more suitable to switch to orc - vs - mcjit. We don’t have requirement of lazy compilation, in that case, is it worth switching?
We do have requirement of ability to serialize machine code and reuse it later. MCJit seems to provide that option - how well is that supported in ORC ?

MCJIT hopefully will be removed in subsequent releases. I think the last release version is more suitable.

Thanks Praveen. Is it suitable for LLVM 7.0.1 ? Apart from flexibility, do we see any compile time improvements as well with ORC?

Yes I think so… Could you please tell me in which context (compile time improvement)? That is whether you are interested in knowing whether having ORC instead of MCJIT, will increase your LLVM Build time or you are concerned about the JIT Compilation time?

yeah i m concerned about jit compilation time…

Okay, ORC by itself doesn’t add any extra compilation time as I’m aware of. Apart from that ORC now multi-threaded compilation also.

Hi Ashok,

Just to add to what Praveen mentioned: I would recommend using the LLJIT class, which is built on ORCv2 and supports object caching via the same ObjectCache interface used by MCJIT. I have just added (in r365671) an example of how to set up an LLJIT instance with object caching. See llvm/examples/LLJITExamples/LLJITWithObjectCache.