1 \documentclass[hyperref={pdfpagelabels=false}]{beamer}
3 %\setbeameroption{show notes}
10 \setbeamercovered{transparent}
11 %\setbeamertemplate{footline}[frame number]
14 \usepackage[english]{babel}
15 \usepackage[latin1]{inputenc}
17 \usepackage[T1]{fontenc}
20 \usepackage{multimedia}
21 \usepackage{subfigure}
23 % Can use a tiny fontsize
26 %\usepackage{pgfpages}
27 %\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm]
29 %For handouts, use the following two lines:
30 %\usepackage{pgfpages}
31 %\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
35 {MontiumC Transforming}
37 \author {Matthijs Kooijman}
39 \institute[Recore Systems and University of Twente]
45 Faculty of Electrical Engineering, Mathematics and Computer Science\\
55 \begin{frame}{Contents}
59 \section{Introduction}
60 \begin{frame}{Low Level Virtual Machine (LLVM)}
62 \item Compiler framework.
65 \alert<2>{\item C Frontend}
66 \alert<2>{\item Intermediate representation (LLVM IR)}
67 \alert<2>{\item Transformation passes}
68 \item Native codegenerators
75 \begin{frame}{Montium Workflow}
76 \pgfdeclareimage[width=\textwidth]{Workflow}{images/Workflow}
77 \pgfuseimage{Workflow}
82 \subsection{Original tasks}
83 \begin{frame}{Original tasks}
85 \item Select LLVM transformations
86 \item Improve and add transformations
87 \item Provide debugging information
91 \subsection{Extra tasks}
92 \begin{frame}{Extra tasks}
94 \item What is MontiumC?
95 \item What is Montium IR?
96 \item Reconfigurable binaries
100 \begin{frame}{What is MontiumC?}
101 \note{Two angles: What do we want, and what do we support.}
103 \item Status: Specification is ongoing
106 \item Clang is nontransparent
107 \note[item]{Clang --- A lot of special cases}
109 \note[item]{Complex C --- A lot of corner cases}
111 \note[item]{Limited C --- Need to use annotations, limited amount of types}
112 \item Assembly vs. High level
113 \note[item]{Tradeoffs -- Code size vs compiler complexity, clarity
114 vs control, clarity vs determinism}
119 \begin{frame}[containsverbatim]
121 \begin{column}{0.5\textwidth}
123 \begin{Verbatim}[fontsize=\tiny]
129 factor = from_int(2);
130 input = alloc_mem(P0M0);
131 output = alloc_mem(P0M1);
133 set_offset(input, 0);
134 set_base(output, -1);
135 set_offset(output, -1);
138 word in = read_mem(input);
139 word out = p0o0(imul(ra1(in), rc1(factor)))
140 add_offset(input, 1);
141 add_offset(output, 1);
144 write_mem(output, out);
145 in = read_mem(input);
146 out = p0m0(imul(ra1(in), rc1(factor)))
147 add_offset(input, 1);
148 add_offset(output, 1);
149 } while(loop_next(LC1));
151 write_mem(output, out);
154 \begin{column}{0.5\textwidth}
156 \begin{Verbatim}[fontsize=\tiny]
161 for (int i=0; i<10; ++i)
162 output[i] = input[i] * 2;
168 \note{} % Empty filler note page
170 \begin{frame}{What is Montium IR?}
172 \item Status: Initial version
175 \item Backend is a fast moving target
177 \note[item]{Corner case --- global constants}
178 \item Hardware dependencies
179 \note[item]{Hardware --- Limited number of conditionals possible}
184 \begin{frame}{Selecting LLVM transformations}
189 \item LLVM Passes assume a lot
190 \note[item]{Assumptions --- Immediates are not free}
191 \item Montium has specific constraints
192 \note[item]{Constraint --- Implicit cycle boundaries and ordering}
197 \begin{frame}{Improving / adding transformations}
199 \item Status: Ongoing
202 \item Staying generic
203 \note[item]{Generic --- LLVM maintained passes are a lot easier}
204 \item New LLVM features
205 \note[item]{Features --- Multiple return values, inlining and
206 annotation attributes}
211 \begin{frame}{Debugging information}
213 \item Status: Not started
216 \item Not much LLVM support yet
217 \note[item]{LLVM support --- New in clang/backend, no support in
218 transformations yet.}
219 \item Transformations
220 \note[item]{Transformations --- Global arguments, argument addition,
226 \begin{frame}{Reconfigurable binaries}
228 \item Status: Recently started
231 \item Tracking variables
232 \note[item]{Tracking --- Through all steps of the process}
233 \item Loss of optimizations
234 \note[item]{Optimizations --- Hard to encode constraints}
235 \item Mostly a backend problem
240 \section{Work process}
241 \begin{frame}{Working at Recore}
244 \item Fast communication
245 \note[item]{Communication --- Mixed teams, easy to "listen in".}
246 \item Constructive brainstorming
247 \note[item]{Brainstorming --- Evaluating different ideas and approaches.}
251 \begin{frame}{Working with LLVM}
253 \item Large community
254 \note[item]{Community --- Companies involved, a lot of full time
257 \note[item]{Support --- mailing list, bug reports solved within 1/2 days.}
258 \item Slightly conflicting goals
259 \note[item]{Goals --- LLVM aims mainly at "regular" architectures.}
263 \section{Conclusions}
264 \begin{frame}{Conclusions}
266 \item LLVM is very suitable
267 \item Defining the problem is harder than solving it
268 \item Three months is short!