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

Re: Continuations, basic blocks, loops and register allocation

Thread Previous | Thread Next
Bill Coffman
November 14, 2004 23:16
Re: Continuations, basic blocks, loops and register allocation
Message ID:
On Sun, 14 Nov 2004 17:03:33 -0500, Dan Sugalski <> wrote:
> 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
> refetched.

I tend to agree that this is not such a problem.  Basically, Parrot
has various control flow possibilities that were not previously
considered.  (1) An exception can happen in a try block, so CFG arcs
need to be added from statements within the try block to the catch. 
(2) Continuations, which I don't pretend to understand, can also flow
in previously unconsidered directions.  Those arcs need to be added to
the CFG.

Alternately, for exceptions, it may be possible to circumvent that
process, and just add symbolic interfenence to all vars in the try
block with all vars in the catch block.

For continuations, however, it seems like those really are control
flow arcs that need to be added.  If analysis can trim a few of them,
then that would be great, but if people are using continuations, maybe
they shouldn't expect high performance, and extra register spilling
may be another side effect.


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