2 Adding @scc@ to the Haskell compiler -- A note of changes required
8 SCC FRONT END SYNTAX: scc "label" expr
10 hslexer.lex scc recognised as SCC
11 hsparser.y scc expression parsed
12 tree.ugn new tree construct
13 printtree.c print scc (k bytecode)
14 main.c -S flag for scc (else warning)
17 reader PrefixSyn new construct (SCC')
18 ReadPrefix read k bytecode
21 abstractSyn HsExpr new construct (SCC)
23 rename RenameExpr4 rename body
24 typecheck TcExpr no unify, use type of body
25 deSugar DsExpr -> CoreSyn
27 Core Syntax & Transformations:
28 coreSyn CoreSyn new construct (CoSCC) not primop
29 AnnCoreSyn new construct
37 simplCore default: not used n
38 stranal-sem default: not used n
39 interpreter york: ??? n
41 Stg Syntax & Transformations:
42 stgSyn CoreToStg -> StgSyn
43 StgSyn new construct (StgSCC)
45 StgInfo (new) pass gathering CC codegen info
47 LetFloat default: not used n
48 StgToStg default: not used n
49 FreeVariables default: not used n
51 Abstract C & Code Generation:
52 main Main -scc flag for update flavour y
53 codeGen CgMonad -scc new Cg info y
54 absCSyn AbsCSyn new construct (CCostCentre) y
56 codeGen CodeGen declaring cost centers y
57 codeGen ClosureInfo closure kind y
59 codeGen CgClosure closure description y
61 abstractC PprAbsC info table kind y
65 Real Code Generation Changes
67 +RCC update frame -- stack space required
71 !different sizes for STD and CON update frames
72 +single entry now requires RCC update frame
73 +resume the CC in closure entered
76 +register return set RetCC (form closure or CCC)
77 +register update reset closures CC to RetCC
78 +attribute register update allocation to RetCC
80 CC_ALLOC calls with heap allocation
83 update closure entry with scc -- no RCC frame ToDo
91 Cost centre declaration macros y
93 Info table macros with "description" etc? y
95 Modify update frames to include cost centres y
96 Dummy update frame return vector y
97 Recognition of dummy ret vect UpdatePAP y
103 Profile info reported y
105 Conditionalise need for timer interupt todo
109 ADDING GRP_NAME to CC and TYPE to CAT:
110 -------------------------------------
112 driver -- -Ggroup flag y
113 main/Main.lhs -- -Ggroup flag y
115 codeGen -- grp_name passed into CCostCentre y
116 absCSyn -- add group to CCostCentre y
117 -- print group with CC decl y
118 -- print type with INFO_TABLE decl y
119 uniType -- getUniTyDescription y
121 runtime -- Add group to CostCentre y
122 -- Add group to CC_DECALRE y
123 -- Add type to ClCategory y
124 -- Add type to CAT_DECLARE y
125 -- Add type to INFO_TABLEs y
127 -- Report group in profiling report y
129 -- Heap profiling with group/module/type
130 -- selection by mod,grp,typ y
131 -- profiling by cc,mod,grp,descr,type y
132 -- always hash on feature y
133 -- report by cc,mod,grp,descr,type y
135 This is different to York as we can have unprofiled
136 costs/heap inherited from other modules/groups.
138 TESTING TESTING TESTING TESTING ToDo
144 driver -- -prof-auto y
145 main/Main.lhs -- -scc-auto y
146 -- doSCCauto pass (desugared) Improve?
147 profiling/SCCauto.lhs -- sccAutoTop Improve?
149 Need to compare to all explicitly annotated. ToDo
151 I think this needs to be incorperated into ToDo
152 the desugarer/typechecker? as the dict stuff
153 currently distorts this.
154 OK if we are using lexical scoping !!!
155 eg: See tautclause in clausify1.hs (cl.*)
160 EXTENDING SCC ANNOTATIONS ... ToDo
161 -----------------------------
163 Front End: let scc "label"
167 hsparser.y extended scc expressions parsed
168 tree.ugn new scc language constructs
169 printtree.c print new scc bytecode forms
172 reader PrefixSyn new constructs
173 ReadPrefix read bytecodes
176 abstractSyn HsExpr new constructs
178 rename RenameExpr4 rename body
179 typecheck TcExpr no unify, use type of body
180 deSugar desugar new scc constructs -> SCC
183 LEXICAL/EVALUATION SCOPING ...
185 driver -- -prof-eval -prof-lex (def) y
186 main/Main.lhs -- -scc-eval -scc-lex y
187 -- doSCClex pass (stg_binds') ToDo
188 ??? -- lexical scoping transform pass ToDo
192 OTHER POSSIBLE STUFF:
194 codegen/CodeGen.lhs -- code to declare mod and group strings
195 -- use references in CCostCentre
197 profiling cost report -- Reporting group / module costs
198 with / without components
199 Eg sort on group time
200 with module time sub-sort
201 with label time sub-sort