Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/branches/SMLNJ/src/MLRISC/ra/ra.sig
ViewVC logotype

View of /sml/branches/SMLNJ/src/MLRISC/ra/ra.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 475 - (download) (as text) (annotate)
Wed Nov 10 22:59:58 1999 UTC (19 years, 8 months ago) by monnier
File size: 1545 byte(s)
version 110.24
(*
 * The interface to the new register allocator.
 *
 * -- Allen
 *)
signature RA =
sig

   structure I : INSTRUCTIONS
   structure C : CELLS
   structure F : RA_FLOWGRAPH 
      sharing F.I = I
      sharing I.C = C

   datatype mode = REGISTER_ALLOCATION | COPY_PROPAGATION

   datatype optimization = DEAD_COPY_ELIM
                         | SPILL_PROPAGATION
                         | SPILL_COALESCING
                         | SPILL_COLORING
                         | BIASED_SELECTION

   type getreg = { pref  : C.cell list,
                   stamp : int, 
                   proh  : int Array.array
                 } -> C.cell

   (*
    * Perform register allocation.
    *
    * spillProh is a list of register ranges (inclusive) that cannot be spilled.
    *
    *)
   val ra : mode -> 
            { cellkind     : C.cellkind,             (* kind of register *)
              spillProh    : (C.cell * C.cell) list, (* don't spill these *)
              K            : int,                    (* number of colors *)
              dedicated    : bool Array.array,       (* dedicated registers *)
              getreg       : getreg,                 (* how to find a color *)
              copyInstr    : F.Spill.copyInstr,      (* how to make a copy *)
              spill        : F.Spill.spill,          (* spill callback *)
              reload       : F.Spill.reload,         (* reload callback *)
              optimizations: optimization list       (* optimizations *)
            } list -> F.flowgraph -> F.flowgraph

end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0