[virtmach] parrot VM?
Chris Lattner
virtmach@iecc.com
Sat, 13 Jul 2002 12:30:23 -0500 (CDT)
> > One very significant drawback of stack-based VMs is that they are almost
> > impossible to do meaningful optimizations on. If your VM performs any
> > substation optimization, you will often find that you have to translate
> > from a stack-based rep to a register based representation anyway, losing
> > any advantages the stack based VM gives you.
> But aren't there some portability issues with a register VM?
> Wouldn't you want to map the VM registers to real registers
> (since you want performance in the first place)? That
> might make it difficult to have a register VM that runs fast
The idea is not to emit a certain number of registers (GNU lightning uses
6 always for example [I believe]), but to use an infinite number of
registers, then run a register allocation pass as part of code generation,
to convert it into the optimal number of registers for the actual
machine...
-Chris
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/