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

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