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 /MLRISC/trunk/ra/ra.sig
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 576 - (view) (download) (as text)
Original Path: sml/trunk/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 :     type getreg = { pref : C.cell list,
16 :     stamp : int,
17 :     proh : int Array.array
18 :     } -> C.cell
19 :    
20 : monnier 498 type mode = word
21 :    
22 : monnier 467 (*
23 : george 545 * Optimizations/options:
24 :     * Or them together
25 : monnier 498 *)
26 : george 545 val NO_OPTIMIZATION : mode
27 :     val DEAD_COPY_ELIM : mode
28 :     val BIASED_SELECTION : mode
29 :     val SPILL_COLORING : mode
30 :     val SPILL_COALESCING : mode
31 :     val SPILL_PROPAGATION : mode
32 :     val COPY_PROPAGATION : mode
33 :     val HAS_PARALLEL_COPIES : mode
34 :     (* The above MUST be used when spill coloring is used and
35 :     * you have parallel copies in the program. Otherwise, phathom
36 :     * problems involving copy temporaries may appear.
37 :     *)
38 : monnier 498
39 :     (*
40 : monnier 467 * Perform register allocation.
41 :     *
42 :     * spillProh is a list of register ranges (inclusive) that cannot be spilled.
43 :     *
44 :     *)
45 : monnier 498 type raClient =
46 :     { cellkind : C.cellkind, (* kind of register *)
47 : leunga 576 spillProh : (C.cell * C.cell) list, (* don't spill these (ranges) *)
48 :     memRegs : (C.cell * C.cell) list, (* ranges of memory registers *)
49 : monnier 498 K : int, (* number of colors *)
50 :     dedicated : bool Array.array, (* dedicated registers *)
51 :     getreg : getreg, (* how to find a color *)
52 :     copyInstr : F.Spill.copyInstr, (* how to make a copy *)
53 :     spill : F.Spill.spill, (* spill callback *)
54 :     spillSrc : F.Spill.spillSrc, (* spill callback *)
55 :     spillCopyTmp : F.Spill.spillCopyTmp, (* spill callback *)
56 :     reload : F.Spill.reload, (* reload callback *)
57 :     reloadDst : F.Spill.reloadDst, (* reload callback *)
58 :     renameSrc : F.Spill.renameSrc, (* rename callback *)
59 :     mode : mode (* mode *)
60 :     }
61 : monnier 467
62 : monnier 498 val ra : raClient list -> F.flowgraph -> F.flowgraph
63 :    
64 : monnier 467 end

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