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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (view) (download) (as text)

1 : monnier 467 (*
2 :     * Abstract view a flowgraph required by the new register allocator.
3 :     * In order to allow different representation to share the same
4 :     * register allocator core, each representation should implement the
5 :     * following interface to talk to the new RA.
6 :     *
7 :     * -- Allen
8 :     *)
9 :    
10 :     signature RA_FLOWGRAPH =
11 :     sig
12 :    
13 :     structure I : INSTRUCTIONS
14 :     structure C : CELLS
15 :     structure G : RA_GRAPH = RAGraph
16 :     structure Spill : RA_SPILL
17 :     structure W : FREQ
18 :     sharing Spill.I = I
19 :     sharing I.C = C
20 :    
21 :     type flowgraph
22 :    
23 : monnier 498 val mode : G.mode
24 :    
25 : monnier 467 (* Extract the regmap from the flowgraph *)
26 :     val regmap : flowgraph -> C.regmap
27 :    
28 :     (* Dump the flograph to a stream *)
29 :     val dumpFlowgraph : string * flowgraph * TextIO.outstream -> unit
30 :    
31 :     (*
32 :     * Interface for communicating with the new register allocator.
33 : leunga 641 * It is expected that the services will cache enough information
34 :     * during build so that the rebuild and spill phases can be execute
35 : monnier 467 * quickly.
36 :     *)
37 :     val services : flowgraph ->
38 :     { build : G.interferenceGraph * C.cellkind->
39 :     G.move list, (* build the graph *)
40 : monnier 498 spill : {copyInstr : Spill.copyInstr,
41 :     spill : Spill.spill,
42 :     spillSrc : Spill.spillSrc,
43 :     spillCopyTmp : Spill.spillCopyTmp,
44 :     reload : Spill.reload,
45 :     reloadDst : Spill.reloadDst,
46 :     renameSrc : Spill.renameSrc,
47 :     graph : G.interferenceGraph,
48 :     nodes : G.node list,
49 :     cellkind : C.cellkind
50 :     } -> G.move list,
51 : monnier 467 (* spill/rebuild the graph *)
52 : monnier 498 programPoint : {block:int, instr:int} -> G.programPoint,
53 :     blockNum : G.programPoint -> int,
54 :     instrNum : G.programPoint -> int
55 : monnier 467 }
56 :    
57 :     end

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