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-spill.sig
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : monnier 467 (*
2 :     * This module manages the spill/reload process.
3 :     *
4 :     * -- Allen
5 :     *)
6 :     signature RA_SPILL =
7 :     sig
8 :    
9 :     structure I : INSTRUCTIONS
10 :     structure C : CELLS
11 :     sharing I.C = C
12 :    
13 :     type copyInstr =
14 :     (C.cell list * C.cell list) * I.instruction -> I.instruction
15 :    
16 :     type spill =
17 :     {instr : I.instruction, (* instruction where spill is to occur *)
18 :     reg : C.cell, (* register to spill *)
19 :     spillLoc : int, (* logical spill location *)
20 :     node : RAGraph.node, (* the current node *)
21 :     kill : bool, (* can we kill the current node? *)
22 :     regmap : C.cell -> C.cell, (* current register map *)
23 :     annotations : Annotations.annotations ref (* annotations *)
24 :     } ->
25 :     {code : I.instruction list, (* spill code *)
26 :     proh : C.cell list, (* prohibited from future spilling *)
27 :     instr : I.instruction option (* possibly changed instruction *)
28 :     }
29 :    
30 :     type reload =
31 :     {instr : I.instruction, (* instruction where spill is to occur *)
32 :     reg : C.cell, (* register to spill *)
33 :     spillLoc : int, (* logical spill location *)
34 :     node : RAGraph.node, (* the current node *)
35 :     regmap : C.cell -> C.cell, (* current register map *)
36 :     annotations : Annotations.annotations ref (* annotations *)
37 :     } ->
38 :     {code : I.instruction list, (* reload code *)
39 :     proh : C.cell list (* prohibited from future spilling *)
40 :     }
41 :    
42 :     (*
43 :     * The following function rewrites an instruction and insert
44 :     * spill and reload code around it. The list of spill and reload
45 :     * registers may have duplicates.
46 :     *)
47 :     val spillRewrite :
48 :     { graph : RAGraph.interferenceGraph,
49 :     spill : spill,
50 :     reload : reload,
51 :     copyInstr : copyInstr,
52 :     cellkind : C.cellkind
53 :     } ->
54 :     { spillRegs : C.cell list, (* registers to spill *)
55 :     killRegs : C.cell list, (* registers to kill *)
56 :     reloadRegs : C.cell list, (* registers to reload *)
57 :     instr : I.instruction, (* instruction to process *)
58 :     annotations : Annotations.annotations ref (* annotations *)
59 :     } ->
60 :     { code : I.instruction list (* instruction sequence after
61 :     * rewriting
62 :     *)
63 :     }
64 :    
65 :     end

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