Minor changes

This commit is contained in:
Théophile Bastian 2024-12-01 21:21:43 +01:00
parent 2f68882783
commit eb1bc1d602
2 changed files with 38 additions and 28 deletions

View file

@ -138,17 +138,6 @@ Gus & 0.00 & 20.37 & 30.59 & 0.82 & 188.04 \\
\textbf{Crucial difference:} \textbf{Crucial difference:}
\end{center} \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{minipage}[t]{0.47\textwidth}
\begin{center} \begin{center}
\textbf{\color{red}Bad} \textbf{\color{red}Bad}
@ -159,6 +148,18 @@ for(c3)
tmp[c1] += A[c1][c3] * x[c3]; tmp[c1] += A[c1][c3] * x[c3];
\end{lstlisting} \end{lstlisting}
\end{minipage} \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{} \pause{}
\begin{center} \begin{center}

View file

@ -70,6 +70,14 @@ add %rbx, (%rax)
\item Loop-carried: luckily, ROB is finite and small \item Loop-carried: luckily, ROB is finite and small
\end{itemize} \end{itemize}
\end{minipage} \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} \end{frame}
@ -142,35 +150,36 @@ int fibo(int* F, int n) {
\footnotesize \footnotesize
\begin{tabular}{c c c c c c c c c l} \begin{tabular}{c c c c c c c c c l}
\toprule \toprule
\textbf{Before} & \multicolumn{2}{c}{\textbf{Registers}} && \textbf{After} & \multicolumn{2}{c}{\textbf{Registers}} &&
\multicolumn{5}{c}{\textbf{Memory}} & \textbf{Dep}\\ \multicolumn{5}{c}{\textbf{Memory}} & \textbf{Dep}\\
\textbf{instr} & \reg{rax} & \reg{edx} \textbf{instr} & \reg{rax} & \reg{edx}
&& \texttt{100} & \texttt{104} & \texttt{108} & \texttt{112} & \texttt{116} & \\ && \texttt{100} & \texttt{104} & \texttt{108} & \texttt{112} & \texttt{116} & \\
\midrule \midrule
0,0 & \unk& \unk&& \unk & \unk & \unk & \unk & \unk & \\ Start & \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 & \\
\midrule \midrule
\pause{} \pause{}
1,1 & 104 & \alert{176} && 200 & 176\h& 376 & \unk & \unk & \\ 0,0 & 100 & 200 && 200\h& \unk & \unk & \unk & \unk & \\
\pause{} \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{} \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 \midrule
\pause{} \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{} \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{} \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{} \bottomrule{}
\end{tabular} \end{tabular}
\end{minipage}\hfill \end{minipage}\hfill