On Tuesday 25 February 2003 08:51, Leopold Toetsch wrote:
> Angel Faus wrote:
> > Saturday 22 February 2003 16:28, Leopold Toetsch wrote:
> >
> > With your approach there are three levels of parrot "registers":
> >
> > - The first N registers, which in JIT will be mapped to physical
> > registers.
> >
> > - The others 32 - N parrot registers, which will be in memory.
> >
> > - The "spilled" registers, which are also on memory, but will have to
> > be copied to a parrot register (which may be a memory location or a
> > physical registers) before being used.
>
> Spilling is really rare, you have to work hard, to get a test case :-)
> But when it comes to spilling, we should do some register renumbering
> (which is the case for processor registers too). The current allocation
> is per basic block. When we start spilling, new temp registers are
> created, so that the register life range is limited to the usage of the
> new temp register and the spill code.
> This is rather expensive, as for one spilled register, the whole life
> analysis has to be redone.

Not knowing much about virtual machine design...  Here's a question --
Why do we have a set number of registers?  Particularily since JITed code 
ends up setting the register constraints again, I'm not sure why parrot 
should set up register limit constraints first.  Couldn't each code block say 
"I need 12 registers for this block" and then the JIT system would go on to 
do it's appropriate spilling magic with the system registers...

I suspect the answer has something to do with optimized C and not making 
things hairy, but I had to ask anyway.  :)

...

Phil

Reply via email to