On Wed, 24 Nov 2004 09:39:27 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote:
> Bill Coffman wrote:
> > On Tue, 23 Nov 2004 23:26:39 +0100, Leopold Toetsch <[EMAIL PROTECTED]> 
> > wrote:
> 
> > Keep in mind that you don't actually have to add all those CFG edges.
> > You already know precisely the effects of adding them.  All
> > non-volatile symbols (those crossing subs that might make continuation
> > invocations) are garanteed to interfere.  This is garanteed to be a
> > clique in the interference graph.  No need to actually add the CFG
> > edges to know how the interference graph is effected.
> 
> Possible, but just another special cased exception. With that you get
> two possible interferences of different kinds, with additional coding
> overhead ...

Instead of n*(n-1) arcs for n continuation passing subs (both to and
from), we can simply add a pseudo instruction.  All n sub calls have
arcs to that pseudo-instruction, and out from it, to the instruction
after the sub call.  This means only 2*n arcs (both to and from).

Each continuation calling sub becomes a kind of wormhole.  Any symbol
crossing it, also crosses the pseudo-instruction.  What makes it a
little complicated is how do these "ubiquetous" symbols interact with
the non-ubuiquitous?  Those arcs are needed for this.



> I've no confirmation of a compiler writer that its possible.
> Annotating PIR can only work for nested closures. If libraries are
> involved you are out of luck.

It was Larry Wall who suggested the pragma in the long thread,
"Continuations, basic blocks, loops and register allocation ". 
Although his message is somewhat genaral, he indicates a prefernce for
pragmas to turn off certain features that slow things down for
correctness.  [gmail works great for finding stuff like that]

Bill

Reply via email to