Dave has left a new comment on your post "Register allocation in a PIR compiler":
Hope you don't mind if I mention a couple of points. Presumably these "freed" registers are being spilled to memory, meaning that they are assigned to a stack location. I don't see how that can be a benefit if the virtual register is just a memory location that you are copying to another memory location and back. This algorithm would seem to be most beneficial if only applied to the first n virtual registers, where n is the number of hardware registers available for use in this way. And as long as we are talking about registers, can I ask a related question? I've just been reading about Parrot for the first time and it looks like the call instructions are all monolithic. One of the advantages of a register-based virtual machine is that calls can be made more efficiently by passing the parameters in registers, but to do that, you have to decompose the call down into separate tasks of setting the argument registers and then branching to the target address. It looks like Parrot does not do that. Is that right? Posted by Dave to Parrot at November 14, 2008 9:22 AM