[LLVMdev] Tool for run-time code generation?

Óscar Fuentes ofv at wanadoo.es
Fri Jul 16 09:16:30 PDT 2010

David Piepgrass <dpiepgrass at mentoreng.com> writes:

> Using C++ code, I would like to generate code at run-time (the same
> way .NET code can use dynamic methods or compiled expressions) in
> order to obtain very high performance code (to read binary data
> records whose formats are only known at run-time.)
> I need to target x86 (Win32) and ARM (WinCE).
> Can LLVM be used for this purpose, or would something else work
> better?

LLVM has a JIT for this purpose. You generate LLVM IR code (a sort of
generic assembler) and it produces optimized native code ready to be

x86-win32 is fine. I don't think so about arm-wince.

> Are there any open-source projects that have done this, that I
> could look to as an example?

This is a list of some of the projects that uses LLVM:


The LLVM tutorial is worth a reading too:


More information about the llvm-dev mailing list