[project @ 1996-07-19 18:36:04 by partain]
[ghc-hetmet.git] / ghc / docs / add_to_compiler / slides.tex
1 %01 title
2 \begin{slide}{}
3 \begin{center}
4 {\Large
5 How To Add\\
6 An Optimisation Pass To\\
7 The Glasgow Haskell Compiler\\[40pt]
8 }
9 {\large
10 Will Partain\\
11 (GRASP Project scribe)
12 }
13 \end{center}
14 \end{slide}
15
16 %02 hello, world
17 \begin{slide}{}
18 {\Large The state of play}
19
20 \begin{verbatim}
21 sun3% time gcc -c hello.c
22 0.240u 0.520s 0:01.00 76.0% 0+51k 0+9io 0pf+0w
23
24 sun3% time nlmlc -c hello.m
25 3.320u 1.740s 0:05.65 89.5% 0+240k 1+21io 1pf+0w
26
27 sun3% time nhc -c hello.hs
28 26.680u 2.860s 0:32.00 92.3% 0+950k 2+31io 18pf+0w
29
30 sun3% time do100x     # C
31 6.980u  7.880s 0:14.93 99.5% 0+50k 0+0io 0pf+0w
32
33 sun3% time do100x     # LML
34 7.880u 10.500s 0:18.50 99.3% 0+57k 1+0io 1pf+0w
35
36 sun3% time do100x     # haskell
37 7.760u 10.440s 0:18.48 98.4% 0+56k 1+0io 1pf+0w
38 \end{verbatim}
39 \end{slide}
40 %% % time hello100 > /dev/null
41 %% 0.060u 0.100s 0:00.16 100.0% 0+51k 0+0io 0pf+0w
42
43 %03 analyses
44 \begin{slide}{}
45 {\Large Analyses (FPCA~'89, PLDI~'91)}
46
47 binding-time analysis\\
48 closure analysis\\
49 complexity analysis\\
50 demand analysis\\
51 facet analysis\\
52 interference analysis\\
53 lifetime analysis\\
54 liveness analysis\\
55 path analysis\\
56 polymorphic-instance analysis\\
57 stacklessness anaysis\\
58 strictness analysis\\
59 time analysis\\
60 update analysis
61 \end{slide}
62
63 \begin{note}
64 Contrast with conventional-compiler concerns:
65
66 use of runtime feedback\\
67 matching w/ low-level hardware concerns\\
68 work very hard for their extra information
69 \end{note}
70
71 \begin{slide}{}
72 {\Large Optimisations in use: LML}
73
74 \begin{itemize}
75 \item
76 constant folding, arithmetic simplification
77 \item
78 many local transformations (case of case...)
79 \item
80 inlining, $\beta$-reduction
81 \item
82 strictness analysis
83 \item
84 G-code and m-code optimisation
85 \end{itemize}
86 \end{slide}