[LLVMdev] Porting a VM to LLVM

Gabriele Farina gabriele at sephiroth.it
Sat Apr 4 01:22:48 PDT 2009


Hi guys,

first of all let me say "hello" to everyone. Its the firt message for  
me in this list and I'm pretty happy that I'll be able to finally  
start working with LLVM.

I've a question for you all if you can help me: a few years ago I've  
implemented a simple VM for a language we're using in my company. The  
VM JIT compiles a simple bytecode and executes it. It works quite  
well, better then some well know VMs. My idea now is to try to migrate  
the VM to LLVM to see if I can gain something in terms of speed and  
extensibility.
I'm totally new to LLVM, but as far as I understood thare might be two  
ways to add LLVM to my project:

- generate IR from my complier;
- build a VM that converts at runtime my bytecode to IR and executes it;

I largely prefer the second option because it would be great if I can  
continue to use to old programs without having to recompile them.

Which approach do you suggest ? are there any alternatives ?

Gabriele



More information about the llvm-dev mailing list