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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/ra/ra.sig
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/ra/ra.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 475 - (view) (download) (as text)
Original Path: sml/branches/SMLNJ/src/MLRISC/ra/ra.sig

1 : monnier 467 (*
2 :     * The interface to the new register allocator.
3 :     *
4 :     * -- Allen
5 :     *)
6 :     signature RA =
7 :     sig
8 :    
9 :     structure I : INSTRUCTIONS
10 :     structure C : CELLS
11 :     structure F : RA_FLOWGRAPH
12 :     sharing F.I = I
13 :     sharing I.C = C
14 :    
15 :     datatype mode = REGISTER_ALLOCATION | COPY_PROPAGATION
16 :    
17 :     datatype optimization = DEAD_COPY_ELIM
18 : monnier 475 | SPILL_PROPAGATION
19 : monnier 467 | SPILL_COALESCING
20 :     | SPILL_COLORING
21 : monnier 475 | BIASED_SELECTION
22 : monnier 467
23 :     type getreg = { pref : C.cell list,
24 :     stamp : int,
25 :     proh : int Array.array
26 :     } -> C.cell
27 :    
28 :     (*
29 :     * Perform register allocation.
30 :     *
31 :     * spillProh is a list of register ranges (inclusive) that cannot be spilled.
32 :     *
33 :     *)
34 :     val ra : mode ->
35 :     { cellkind : C.cellkind, (* kind of register *)
36 :     spillProh : (C.cell * C.cell) list, (* don't spill these *)
37 :     K : int, (* number of colors *)
38 :     dedicated : bool Array.array, (* dedicated registers *)
39 :     getreg : getreg, (* how to find a color *)
40 :     copyInstr : F.Spill.copyInstr, (* how to make a copy *)
41 :     spill : F.Spill.spill, (* spill callback *)
42 :     reload : F.Spill.reload, (* reload callback *)
43 :     optimizations: optimization list (* optimizations *)
44 :     } list -> F.flowgraph -> F.flowgraph
45 :    
46 :     end

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