3364e6cf56d976a41bb84cc522d59d472d4062df
[matthijs/projects/internship.git] / Progress presentation / Presentation.tex
1 \documentclass[hyperref={pdfpagelabels=false}]{beamer}
2
3 \setbeameroption{show notes}
4
5 \mode<presentation>
6 {
7   %\useinnertheme{echt}
8   %\useinnertheme{proef}
9   \usetheme{recore}
10   \setbeamercovered{transparent}
11 %\setbeamertemplate{footline}[frame number]
12 }
13
14 \usepackage[english]{babel}
15 \usepackage[latin1]{inputenc}
16 \usepackage{times}
17 \usepackage[T1]{fontenc}
18 \usepackage{acronym}
19 \usepackage{tikz}
20 \usepackage{multimedia}
21 \usepackage{subfigure}
22 \usepackage{booktabs}
23 % Can use a tiny fontsize
24 \usepackage{fancyvrb}
25
26 %For handouts, use the following two lines:
27 %\usepackage{pgfpages}
28 %\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
29
30
31 \title
32 {MontiumC Transforming}
33
34 \author {Matthijs Kooijman}
35
36 \institute[Recore Systems and University of Twente]
37 {
38   \inst{}%
39   Recore Systems
40   \and
41   \inst{}%
42   Faculty of Electrical Engineering, Mathematics and Computer Science\\
43   University of Twente
44   }
45   
46 \begin{document}
47
48 \begin{frame}
49         \titlepage
50 \end{frame}
51
52 \begin{frame}{Contents}
53   \tableofcontents
54 \end{frame}
55
56 \section{Introduction}
57   \subsection{Montium Tile Processor}
58   \subsection{MontiumC}
59   \subsection{LLVM}
60   \subsection{Compile process}
61     \begin{frame}{Compiling MontiumC}
62       \pgfdeclareimage[width=\textwidth]{Compiling}{images/Compiling}
63       \pgfuseimage{Compiling}
64     \end{frame}
65
66 \section{Tasks}
67
68   \subsection{Original tasks}
69     \begin{frame}{Original tasks}
70       \begin{itemize}
71         \item Select LLVM transformations
72         \item Improve and add transformations
73         \item Provide debugging information
74       \end{itemize}
75     \end{frame}
76
77   \subsection{Extra tasks}
78     \begin{frame}{Extra tasks}
79       \begin{itemize}
80         \item What is MontiumC?
81         \item What is Montium IR?
82       \end{itemize}
83     \end{frame}
84
85     \begin{frame}{What is MontiumC?}
86       \begin{itemize}
87       \item Status: Specification is ongoing
88       \item Challenges:
89         \begin{itemize}
90           \item Clang is nontransparent
91           \note[item]{Clang --- A lot of special cases}
92           \item C is complex
93           \note[item]{Complex C --- A lot of corner cases}
94           \item C is limited
95           \note[item]{Limited C --- Need to use annotations, limited amount of types}
96           \item Assembly vs. High level
97           \note[item]{Tradeoffs -- Code size vs compiler complexity, clarity
98           vs control, clarity vs determinism}
99         \end{itemize}
100       \end{itemize}
101     \end{frame}
102
103     \begin{frame}[containsverbatim]
104       \begin{columns}
105         \begin{column}{0.5\textwidth}
106           Low level
107           \begin{Verbatim}[fontsize=\tiny]
108 mem input;
109 mem output;
110 word factor;
111
112 void run(void) {
113   factor = from_int(2);
114   input  = alloc_mem(P0M0);
115   output = alloc_mem(P0M1);
116   set_base(input, 0);
117   set_offset(input, 0);
118   set_base(output, -1);
119   set_offset(output, -1);
120
121   next_cycle();
122   word in = read_mem(input);
123   word out = p0o0(imul(ra1(in), rc1(factor)))
124   add_offset(input, 1);
125   add_offset(output, 1);
126   init_loop(LC1, 8);
127   do {
128     write_mem(output, out);
129     in = read_mem(input);
130     out = p0m0(imul(ra1(in), rc1(factor)))
131     add_offset(input, 1);
132     add_offset(output, 1);
133   } while(loop_next(LC1));
134
135   write_mem(output, out);
136 \end{Verbatim}
137         \end{column}
138         \begin{column}{0.5\textwidth}
139           High level
140           \begin{Verbatim}[fontsize=\tiny]
141 P0M0 int input[10];
142 P0M1 int output[10];
143
144 void run(void) {
145   for (int i=0; i<10; ++i)
146     output[i] = input[i] * 2;
147 }
148           \end{Verbatim}
149         \end{column}
150       \end{columns}
151     \end{frame}
152
153     \begin{frame}{What is Montium IR?}
154       \begin{itemize}
155         \item Status: Initial version
156         \item Challenges:
157         \begin{itemize}
158           \item Fast moving target
159           \item Corner cases
160           \note[item]{Corner case --- global constants}
161           \item Hardware dependencies
162           \note[item]{Hardware --- Limited number of conditionals possible}
163         \end{itemize}
164       \end{itemize}
165     \end{frame}
166
167     \begin{frame}{Selecting LLVM transformations}
168       \begin{itemize}
169         \item Status: Done
170         \item Challenges:
171         \begin{itemize}
172           \item LLVM Passes assume a lot
173           \note[item]{Assumptions --- Immediates are not free}
174           \item Montium has specific constraints
175           \note[item]{Constraint --- Implicit cycle boundaries and ordering}
176         \end{itemize}
177       \end{itemize}
178     \end{frame}
179
180     \begin{frame}{Improving / adding transformations}
181       \begin{itemize}
182         \item Status: Ongoing
183         \item Challenges:
184         \begin{itemize}
185           \item Staying generic
186           \note[item]{Generic --- LLVM maintained passes are a lot easier}
187           \item New LLVM features
188           \note[item]{Features --- Multiple return values, inlining and
189           annotation attributes}
190         \end{itemize}
191       \end{itemize}
192     \end{frame}
193
194     \begin{frame}{Debugging information}
195       \begin{itemize}
196         \item Status: Not started
197         \item Challenges:
198         \begin{itemize}
199           \item Not much LLVM support yet
200           \note[item]{LLVM support --- New in clang/backend, no support in
201           transformations yet.}
202           \item Transformations
203           \note[item]{Transformations --- Global arguments, argument addition,
204           removal, etc.}
205         \end{itemize}
206       \end{itemize}
207     \end{frame}
208
209     \begin{frame}{Reconfigurable binaries}
210       \begin{itemize}
211         \item Status: Recently started
212         \item Challenges:
213         \begin{itemize}
214           \item Tracking variables
215           \note[item]{Tracking --- Through all steps of the process}
216           \item Loss of optimizations
217           \note[item]{Optimizations --- Hard to encode constraints}
218           \item Mostly a backend problem
219         \end{itemize}
220       \end{itemize}
221     \end{frame}
222
223 \section{Work process}
224   \begin{frame}{Recore}
225     \begin{itemize}
226       \item Fast communication
227       \note[item]{Communication --- Mixed teams, easy to "listen in".}
228       \item Constructive brainstorming
229       \note[item]{Brainstorming --- Evaluating different ideas and approaches.}
230     \end{itemize}
231   \end{frame}
232
233   \begin{frame}{LLVM}
234     \begin{itemize}
235       \item Large community
236       \note[item]{Community --- Companies involved, a lot of full time
237       developers.}
238       \item Great support
239       \note[item]{Support --- mailing list, bug reports solved within 1/2 days.}
240       \item Slightly conflicting goals
241       \note[item]{Goals --- LLVM aims mainly at "regular" architectures.}
242     \end{itemize}
243   \end{frame}
244
245 \section{Conclusions}
246
247 \end{document}