develooper Front page | perl.perl6.internals | Postings from November 2004

Re: Continuations, basic blocks, loops and register allocation

Thread Previous | Thread Next
Dan Sugalski
November 14, 2004 14:04
Re: Continuations, basic blocks, loops and register allocation
Message ID:
At 5:53 PM +0100 11/13/04, Leopold Toetsch wrote:
>As the analysis of test errors of the new reigster allocator has 
>shown, we have a problem WRT register allocation. This problem isn't 
>new, but as the allocator is more efficiently reusing registers (or 
>reusing them in a different way) it's exposed again.

We don't really have that much of a problem. What we have is just 
something more simple -- the target of a continuation marks the start 
of a basic block. That means that we have to assume everything we 
don't get handed back from the function's dirty and should be 

Or, alternately, if we declare that the top half of the register set 
is preserved on function call and return we can assume that the PMCs 
and values in there are acceptable for use, though any that map to 
lexicals or globals ought to be refetched, since we have the 
possibility that the names have been rebound.

I'm perfectly fine in declaring that this is *only* legitimate in 
mainline code, and that code generators don't have to deal with the 
possibility that vtable or MMD function code has rebound names.

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                       teddy bears get drunk

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About