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/releases/release-110.84/IR/mlrisc-ir.sig
ViewVC logotype

Annotation of /MLRISC/releases/release-110.84/IR/mlrisc-ir.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (view) (download) (as text)
Original Path: sml/trunk/src/MLRISC/IR/mlrisc-ir.sig

1 : monnier 245 (*
2 : monnier 411 * MLRISC IR
3 :     *
4 : monnier 245 * This is for performing whole program analysis.
5 : monnier 411 * All optimizations are based on this representation.
6 :     * It provides a few useful views: dominator tree, control dependence graph,
7 :     * loop nesting (interval) structure etc. Also there is a mechanism to
8 :     * incrementally attach additional views to the IR. The SSA infrastructure
9 :     * is implemented in such a manner.
10 :     *
11 :     * -- Allen
12 : monnier 245 *)
13 :    
14 :     signature MLRISC_IR =
15 :     sig
16 :    
17 :     structure I : INSTRUCTIONS
18 :     structure CFG : CONTROL_FLOW_GRAPH
19 :     structure Dom : DOMINATOR_TREE
20 :     structure CDG : CONTROL_DEPENDENCE_GRAPH
21 :     structure Loop : LOOP_STRUCTURE
22 :     structure Util : CFG_UTIL
23 :     sharing Util.CFG = CFG
24 :     sharing CFG.I = I
25 :     sharing Loop.Dom = CDG.Dom = Dom
26 :    
27 :     type cfg = CFG.cfg
28 :     type IR = CFG.cfg (* The IR looks just like a CFG! *)
29 :     type dom = (CFG.block,CFG.edge_info,CFG.info) Dom.dominator_tree
30 :     type pdom = (CFG.block,CFG.edge_info,CFG.info) Dom.postdominator_tree
31 :     type cdg = (CFG.block,CFG.edge_info,CFG.info) CDG.cdg
32 :     type loop = (CFG.block,CFG.edge_info,CFG.info) Loop.loop_structure
33 :    
34 :     (*
35 :     * Extract various views from an IR.
36 :     * These are computed by need.
37 :     *)
38 :     val dom : IR -> dom
39 :     val pdom : IR -> pdom
40 : monnier 411 val doms : IR -> dom * pdom
41 : monnier 245 val cdg : IR -> cdg
42 :     val loop : IR -> loop
43 :    
44 :     (*
45 :     * Signal that the IR has been changed
46 :     *)
47 :     val changed : IR -> unit
48 :    
49 :     (*
50 :     * View as a picture
51 :     *)
52 : monnier 411 val view : string -> IR -> unit (* view some facet of the IR *)
53 :     val views : string list -> IR -> unit (* view a set of facets *)
54 :     val viewSubgraph : IR -> cfg -> unit (* view a subgraph of the IR *)
55 : monnier 245
56 :     (*
57 :     * This function allows the client to design a new view and extend
58 :     * the functionality of the IR
59 :     *)
60 : monnier 411 val memo : string -> (IR -> 'facet) -> IR -> 'facet
61 :     val addLayout : string -> (IR -> GraphLayout.layout) -> unit
62 : monnier 245
63 :     end
64 :    

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