new SSA IL

Matthew Fluet mfluet@intertrust.com
Wed, 8 Aug 2001 08:20:19 -0700 (PDT)


> >       structure Function:
> > 	 sig
> > 	    datatype t =
> > 	       T of {
> > 		     name: Func.t,
> > 		     args: (Var.t * Type.t) vector,
> > 		     start: Label.t, (* Must be nullary. *)
> > 		     blocks: Block.t vector,
> > 		     returns: Type.t vector
> > 		     }
> > 	 end
>
> It also nicely allows us to
> rewrite non-tail calls to self as Goto's, which is something that requires
> a little hackery in backend.fun (and even more under the new codegen,
> where the kind of transfer is more important).

So, I'm wrong about this -- the Must be nullary condition on the start
label means that non-tail calls to self cannot just be rewritten as Goto's
to the start label.  I was thinking the structure was more like

structure Function:
  sig
    datatype t =
      T of {
            name: Func.t,
            args: Type.t vector,
            start: Label.t (* must have args of same type as args *)
            blocks: Block.t vector,
            returns: Type.t vector
           }
  end

Note that the rewrite I'm proposing above is really a matter of calling
convention.