From eb1bc1d6027fc8144c807b910a77323f4cee0b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Sun, 1 Dec 2024 21:21:43 +0100 Subject: [PATCH] Minor changes --- slides/40_cesasme/main.tex | 23 ++++++++++--------- slides/50_staticdeps/main.tex | 43 +++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/slides/40_cesasme/main.tex b/slides/40_cesasme/main.tex index ae631a1..508a5be 100644 --- a/slides/40_cesasme/main.tex +++ b/slides/40_cesasme/main.tex @@ -138,17 +138,6 @@ Gus & 0.00 & 20.37 & 30.59 & 0.82 & 188.04 \\ \textbf{Crucial difference:} \end{center} -\begin{minipage}[t]{0.47\textwidth} - \begin{center} - \textbf{\color[HTML]{008f0c}Good} - \end{center} - \vspace{-1em} -\begin{lstlisting}[language={[ANSI]C}] -for(c3) - A[c1][c3] += u1[c1] * v1[c3] - + u2[c1] * v2[c3]; -\end{lstlisting} -\end{minipage}\hfill\vrule\hfill \begin{minipage}[t]{0.47\textwidth} \begin{center} \textbf{\color{red}Bad} @@ -159,6 +148,18 @@ for(c3) tmp[c1] += A[c1][c3] * x[c3]; \end{lstlisting} \end{minipage} +\hfill\vrule\hfill +\begin{minipage}[t]{0.47\textwidth} + \begin{center} + \textbf{\color[HTML]{008f0c}Good} + \end{center} + \vspace{-1em} +\begin{lstlisting}[language={[ANSI]C}] +for(c3) + A[c1][c3] += u1[c1] * v1[c3] + + u2[c1] * v2[c3]; +\end{lstlisting} +\end{minipage} \pause{} \begin{center} diff --git a/slides/50_staticdeps/main.tex b/slides/50_staticdeps/main.tex index 8035bee..ca2f93d 100644 --- a/slides/50_staticdeps/main.tex +++ b/slides/50_staticdeps/main.tex @@ -70,6 +70,14 @@ add %rbx, (%rax) \item Loop-carried: luckily, ROB is finite and small \end{itemize} \end{minipage} + + \pause{} + \bigskip + \begin{center} + \textbf{Hypothesis:} pointers from context \alert{do not + alias}.\\ + Compilers prefer passing a single pointer. + \end{center} \end{frame} @@ -142,35 +150,36 @@ int fibo(int* F, int n) { \footnotesize \begin{tabular}{c c c c c c c c c l} \toprule - \textbf{Before} & \multicolumn{2}{c}{\textbf{Registers}} && + \textbf{After} & \multicolumn{2}{c}{\textbf{Registers}} && \multicolumn{5}{c}{\textbf{Memory}} & \textbf{Dep}\\ \textbf{instr} & \reg{rax} & \reg{edx} && \texttt{100} & \texttt{104} & \texttt{108} & \texttt{112} & \texttt{116} & \\ \midrule - 0,0 & \unk& \unk&& \unk & \unk & \unk & \unk & \unk & \\ - \pause{} - 0,1 & 100 & 200 && 200\h& \unk & \unk & \unk & \unk & \\ - \pause{} - 0,2 & 100 & 376 && 200 & 176\h& \unk & \unk & \unk & \\ - \pause{} - 0,3 & 100 & 376 && 200 & 176 & 376\w& \unk & \unk & \\ - \pause{} - 0,4 & \alert{104} & 376 && 200 & 176 & 376 & \unk & \unk & \\ - 0,5 & 100 & 376 && 200 & 176 & 376 & \unk & \unk & \\ + Start & \unk& \unk&& \unk & \unk & \unk & \unk & \unk & \\ \midrule \pause{} - 1,1 & 104 & \alert{176} && 200 & 176\h& 376 & \unk & \unk & \\ + 0,0 & 100 & 200 && 200\h& \unk & \unk & \unk & \unk & \\ \pause{} - 1,2 & 104 & \alert{552} && 200 & 176 & 376\h& \unk & \unk & \dep{-1,3}\\ + 0,1 & 100 & 376 && 200 & 176\h& \unk & \unk & \unk & \\ \pause{} - 1,3 & 104 & 552 && 200 & 176 & 376 & 552\w& \unk & \\ + 0,2 & 100 & 376 && 200 & 176 & 376\w& \unk & \unk & \\ + \pause{} + 0,3 & \alert{104} & 376 && 200 & 176 & 376 & \unk & \unk & \\ + 0,4 & 100 & 376 && 200 & 176 & 376 & \unk & \unk & \\ \midrule \pause{} - 2,1 & 108 & \alert{376} && 200 & 176 & 376\h& 552 & \unk & \dep{-2,3}\\ + 1,0 & 104 & \alert{176} && 200 & 176\h& 376 & \unk & \unk & \\ \pause{} - 2,2 & 108 & \alert{928} && 200 & 176 & 376 & 552\h& \unk & \dep{-1,3}\\ + 1,1 & 104 & \alert{552} && 200 & 176 & 376\h& \unk & \unk & \dep{-1,2}\\ \pause{} - 2,3 & 108 & 928 && 200 & 176 & 376 & 552 & 928\w &\\ + 1,2 & 104 & 552 && 200 & 176 & 376 & 552\w& \unk & \\ + \midrule + \pause{} + 2,0 & 108 & \alert{376} && 200 & 176 & 376\h& 552 & \unk & \dep{-2,2}\\ + \pause{} + 2,1 & 108 & \alert{928} && 200 & 176 & 376 & 552\h& \unk & \dep{-1,2}\\ + \pause{} + 2,2 & 108 & 928 && 200 & 176 & 376 & 552 & 928\w &\\ \bottomrule{} \end{tabular} \end{minipage}\hfill