[LLVMdev] Saving/restoring executable code from the the JIT?

Óscar Fuentes ofv at wanadoo.es
Sat Sep 12 14:47:41 PDT 2009


Renato Golin <rengolin at systemcall.org> writes:

> or what about register variables, or objects half as registers half in
> memory, or optimizations that exists on one machine (presence of FPU,
> MMU, etc) and not on others, byte sex, word size and many other
> problems... All of this is the job of serialization engine.

[snip]

My goal is to avoid waiting several minutes on application startup until
optimization and native codegen ends. No suspending/restarting, just
compiling, saving native generated code, and loading on future sessions,
more akin a conventional compiler.

Generating a dll is not an option because:

 1. It will require distributing a linker.

 2. It will require the presence of an import library satisfying the
 external symbols referenced by the dll, and some of those symbols are
 unknown until the application starts (this may not apply to unixes, but
 it does for windows). Essentially, LLVM would have to do the linker's
 work when the previously saved native code is loaded back by the
 application on the next session.

 3. Some other reasons I forgot when studied the idea on the past.

-- 
Óscar




More information about the llvm-dev mailing list