IR code generation and JIT execution in a multithread environment

Hi Everyone,

my goal is to create a service with multiple threads, each of them
generating IR code and JIT'ing/executing it in their threads
and some threads will share generated code through a code repository...

1. Is there a guideline/docu out there, which describes serialization of
some LLVM objects,
especially llvm::ExecutionEngine, llvm::ModuleProvider, llvm::Module?
2. Since llvm::ExecutionEngine can contain multiple llvm::ModuleProvider
is it a good idea to keep it as a base of a code repository?
3. Is the memory consumption by the llvm::ExecutionEngine controllable
(i.e. via LRU algorithm for llvm::ModuleProvider instances)?

Best regards
Edgar Geisler