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 468 - (view) (download) (as text)
Original Path: sml/branches/SMLNJ/src/MLRISC/ra/ra-flowgraph.sig

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 :    
22 :     type flowgraph
23 :    
24 :     (* Extract the regmap from the flowgraph *)
25 :     val regmap : flowgraph -> C.regmap
26 :    
27 :     (* Dump the flograph to a stream *)
28 :     val dumpFlowgraph : string * flowgraph * TextIO.outstream -> unit
29 :    
30 :     (*
31 :     * Interface for communicating with the new register allocator.
32 :     * It is expected that the service provide will cache enough information
33 :     * during build so that the rebuild and split phases can be execute
34 :     * quickly.
35 :     *)
36 :     val services : flowgraph ->
37 :     { build : G.interferenceGraph * C.cellkind->
38 :     G.move list, (* build the graph *)
39 :     spill : {copyInstr : Spill.copyInstr,
40 :     spill : Spill.spill,
41 :     reload : Spill.reload,
42 :     graph : G.interferenceGraph,
43 :     nodes : G.node list,
44 :     cellkind : C.cellkind
45 :     } -> G.move list,
46 :     (* spill/rebuild the graph *)
47 :     freq : G.programPoint -> W.freq (* execution frequency *)
48 :     }
49 :    
50 :     end

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