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/compiler/MLRISC-OPTIMIZER.cm
ViewVC logotype

Annotation of /sml/trunk/src/compiler/MLRISC-OPTIMIZER.cm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 246 - (view) (download)

1 : monnier 245 (* This file is intended to load MLRISC optimization modules within
2 :     * the toplevel interactive loop. At present various compiler data
3 :     * structures can be graphically viewed.
4 :     *)
5 :    
6 :     (* The following steps are required:
7 :     Requires:
8 :     daVinci: ftp://ftp.uni-bremen.de/pub/graphics/daVinci,
9 :     or
10 :     vcg: http://www.cs.uni-sb.de/RW/users/sander/html/gsvcg1.html
11 :    
12 :    
13 :     1. Load the optimizer sources:
14 :    
15 :     CM.make'{force_relink=false,
16 :     group="src/compiler/MLRISC-OPTIMIZER.cm"};
17 :    
18 :     2. At the top level execute:
19 :    
20 :     structure M = Compiler.Control.MLRISC;
21 :    
22 :     M.mlrisc :=true; (* enable optimizer *)
23 :     M.getString "viewer" := "daVinci"; (* set viewer *)
24 :     M.getFlag "view_IR" := true; (* enable viewer *)
25 :     M.mlrisc_phases := (* set phases *)
26 :     ["cluster->cfg", "view-dom", "cfg->cluster"];
27 :    
28 :     3. Compiling anything from here onwards, will go through the
29 :     optimizer.
30 :    
31 :     Currently, the optimizer uses two different representations:
32 :     the cluster and the IR. The cluster is the old representation used
33 :     in the register allocator and instruction selection. The IR
34 :     is the new representation. Most new optimizations operate on
35 :     the new IR.
36 :    
37 :     Several phases are possible in the mlrisc_phases list such as:
38 :    
39 :     a. view-cfg -- view control flow graph
40 :     b. view-dom -- view dominator tree
41 :     c. view-pdom -- view post dominator tree
42 :     d. view-doms -- view dominator tree and post dominator tree together.
43 :     The post dominator is upside down.
44 :     e. view-cdg -- view control dependence graph
45 :     f. view-loop -- show loop nesting tree
46 :     g. guess -- apply static branch prediction
47 :     (this need better machine descriptions)
48 :     h. reshape -- reorder the branch structure using frequencies
49 :     gathered by static branch prediction
50 :    
51 :     All phases above transform IR into IR, so
52 :     they must be enclosed in phases "cluster->cfg", and "cfg->cluster",
53 :     which translate clusters into IRs and vice versa. In addition,
54 :     there is a phase "copy-prop", which performs copy propagation on
55 :     clusters.
56 :     *)
57 :    
58 :     Group is
59 :    
60 :     CodeGen/optimizer/mlrisc-optimizer.sml
61 :     CodeGen/optimizer/mlrisc-environment.sml
62 :    
63 :     ../MLRISC/library/annotations.sig
64 :     ../MLRISC/library/annotations.sml
65 :     ../MLRISC/library/array-sig.sig
66 :     ../MLRISC/library/bitset.sig
67 :     ../MLRISC/library/bitset.sml
68 :     ../MLRISC/library/dynamic-array.sml
69 :     ../MLRISC/library/fixed-point.sig
70 :     ../MLRISC/library/fixed-point.sml
71 :     ../MLRISC/library/hash-array.sml
72 :     ../MLRISC/library/priQueue.sig
73 :     ../MLRISC/library/priQueue.sml
74 :     ../MLRISC/library/regset.sig
75 :     ../MLRISC/library/regset.sml
76 :     ../MLRISC/library/sorting.sml
77 :     ../MLRISC/library/stringStream.sml
78 :    
79 :     ../MLRISC/graphs/digraph.sml
80 :     ../MLRISC/graphs/graph-comb.sig
81 :     ../MLRISC/graphs/graph-comb.sml
82 :     ../MLRISC/graphs/graph-topsort.sig
83 :     ../MLRISC/graphs/graph-topsort.sml
84 :     ../MLRISC/graphs/graph.sig
85 :     ../MLRISC/graphs/graph.sml
86 :     ../MLRISC/graphs/graphimpl.sig
87 :     ../MLRISC/graphs/isograph.sml
88 :     ../MLRISC/graphs/renamegraph.sml
89 :     ../MLRISC/graphs/revgraph.sml
90 :     ../MLRISC/graphs/uniongraph.sml
91 :     ../MLRISC/graphs/update-graph-info.sml
92 :    
93 :     ../MLRISC/visualization/allDisplays.sml
94 :     ../MLRISC/visualization/daVinci.sml
95 :     ../MLRISC/visualization/graphDisplay.sig
96 :     ../MLRISC/visualization/graphLayout.sml
97 :     ../MLRISC/visualization/graphViewer.sig
98 :     ../MLRISC/visualization/graphViewer.sml
99 :     ../MLRISC/visualization/vcg.sml
100 :    
101 :     ../MLRISC/ir/cdg.sig
102 :     ../MLRISC/ir/cdg.sml
103 :     ../MLRISC/ir/dominator.sig
104 :     ../MLRISC/ir/dominator.sml
105 :     ../MLRISC/ir/loop-structure.sig
106 :     ../MLRISC/ir/loop-structure.sml
107 :    
108 :     ../MLRISC/IR/dataflow.sig
109 :     ../MLRISC/IR/dataflow.sml
110 :     (* ../MLRISC/IR/mlrisc-cfg-structuring.sml*)
111 :     ../MLRISC/IR/mlrisc-cfg-util.sig
112 :     ../MLRISC/IR/mlrisc-cfg-util.sml
113 :     ../MLRISC/IR/mlrisc-cfg.sig
114 :     ../MLRISC/IR/mlrisc-cfg.sml
115 :     ../MLRISC/IR/mlrisc-cfg2cluster.sml
116 :     ../MLRISC/IR/mlrisc-cluster2cfg.sml
117 :     ../MLRISC/IR/mlrisc-format-insn.sml
118 :     ../MLRISC/IR/mlrisc-ir.sig
119 :     ../MLRISC/IR/mlrisc-ir.sml
120 :     ../MLRISC/IR/mlrisc-liveness.sml
121 :     ../MLRISC/IR/mlrisc-reshape-branches.sig
122 :     ../MLRISC/IR/mlrisc-reshape-branches.sml
123 :     ../MLRISC/IR/static-branch-prediction.sig
124 :     ../MLRISC/IR/static-branch-prediction.sml
125 :    
126 :     ../MLRISC/Glue/mlrisc-glue.sig
127 :     ../MLRISC/Glue/mlrisc-glue.sml

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