[LLVMdev] reading, printing, compiling, JIT-ing LLVM modules?
Chris Lattner
sabre at nondot.org
Sun Jan 14 11:22:38 PST 2007
On Mon, 8 Jan 2007, Basile STARYNKEVITCH wrote:
> I would like to (portably) store an LLVM module in bytecode format
> inside a MySQL table row (probably inside a BLOB = mysql binary large
> object = big array of bytes). AFAIK, this could easiy be done with the
> llvm::Module::print function (into a memory ostream) -ie the print
> method of the Module class
LLVM can do everything that you want: store code, jit compile it, etc.
What it can't do is provide portability for C code. C is not a portable
language: target-specific details like the size of datatypes leak into the
generated code, preprocessor symbols are defined differently for different
targets, etc.
If you use a portable input language, LLVM can preserve that portability.
However, for C, you can't be guaranteed that your input will be portable.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list