+ \begin{frame}[containsverbatim]{Constant propagation}
+ \begin{columns}
+ \begin{column}{0.5\textwidth}
+ Before
+ \begin{Verbatim}[fontsize=\tiny]
+
+int mul(int a, int b) {
+ return a * b;
+}
+
+void run(void) {
+ ...
+ mul(x, 2);
+ ...
+ mul(y, 2);
+ ...
+}
+ \end{Verbatim}
+ \end{column}
+ \begin{column}{0.5\textwidth}
+ After
+ \begin{Verbatim}[fontsize=\tiny]
+
+int mul(int a) {
+ return a * 2;
+}
+
+void run(void) {
+ ...
+ mul(x);
+ ...
+ mul(y);
+ ...
+}
+ \end{Verbatim}
+ \end{column}
+ \end{columns}
+ \note{Mainly useful when using library code}
+ \end{frame}
+
+ \begin{frame}[containsverbatim]{Function duplication}
+ \begin{columns}
+ \begin{column}{0.5\textwidth}
+ Before
+ \begin{Verbatim}[fontsize=\tiny]
+
+int mul(int a, int b) {
+ return a * b;
+}
+
+void run(void) {
+ ...
+ mul(x, 2);
+ ...
+ mul(y, 2);
+ ...
+ mul(z, 4);
+ ...
+ mul(w, 4);
+ ...
+}
+ \end{Verbatim}
+ \end{column}
+ \begin{column}{0.5\textwidth}
+ After
+ \begin{Verbatim}[fontsize=\tiny]
+
+int mul2(int a) {
+ return a * 2;
+}
+
+int mul4(int a) {
+ return a * 4;
+}
+
+void run(void) {
+ ...
+ mul2(x);
+ ...
+ mul2(y);
+ ...
+ mul4(z);
+ ...
+ mul4(w);
+ ...
+}
+ \end{Verbatim}
+ \end{column}
+ \end{columns}
+ \note{Mainly useful when values must really be constant (masks, loop
+ counters)}
+ \end{frame}
+
+\section{Future work}
+ \begin{frame}{Open issues}