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,6 +138,17 @@ 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{red}Bad}
\end{center}
\vspace{-1em}
\begin{lstlisting}[language={[ANSI]C}]
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}
@ -147,16 +158,6 @@ Gus & 0.00 & 20.37 & 30.59 & 0.82 & 188.04 \\
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}
\end{center}
\vspace{-1em}
\begin{lstlisting}[language={[ANSI]C}]
for(c3)
tmp[c1] += A[c1][c3] * x[c3];
\end{lstlisting}
\end{minipage}

View file

@ -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