From 21c6b1ec8315cd027490dacb5c0c1f63a6be046a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Fri, 29 Nov 2024 13:32:50 +0100 Subject: [PATCH] Staticdeps intro: partial writeup --- slides/50_staticdeps/main.tex | 58 +++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/slides/50_staticdeps/main.tex b/slides/50_staticdeps/main.tex index 87bfb38..15e0ba3 100644 --- a/slides/50_staticdeps/main.tex +++ b/slides/50_staticdeps/main.tex @@ -1,10 +1,61 @@ \section{\staticdeps: static extraction of memory-carried dependencies} -\begin{frame} +\begin{frame}[fragile]{Dependencies, through registers} + \begin{minipage}[c]{0.35\textwidth} + +\begin{lstlisting}[language={[x86masm]Assembler}, numbers=none] +0: mov (%rax), %rcx + ... +3: add %rcx, %rdx +\end{lstlisting} + \end{minipage}\hfill + \begin{minipage}[c]{0.5\textwidth} + \begin{itemize} + \item Track register writes + \item Generate dependency upon read + \end{itemize} + \end{minipage} + + \begin{center} + 3 $\rightarrow$ 0 through \reg{rcx} + \end{center} +\end{frame} + + +\begin{frame}[fragile]{Dependencies, loop-carried} + \begin{minipage}[c]{0.40\textwidth} +\begin{lstlisting}[language={[x86masm]Assembler}, numbers=none] +loop: +0: add %rcx, %rdx + ... +3: mov (%rax), %rcx +6: jmp loop + \end{lstlisting} + \end{minipage}\hfill + \begin{minipage}[c]{0.1\textwidth} + $\longrightarrow$ + \end{minipage}\hfill + \begin{minipage}[c]{0.40\textwidth} +\begin{lstlisting}[language={[x86masm]Assembler}, numbers=none] +0,0: add %rcx, %rdx + ... +0,3: mov (%rax), %rcx +1,0: add %rcx, %rdx + ... +1,3: mov (%rax), %rcx +\end{lstlisting} + \end{minipage} + + \begin{center} + 0,3 $\rightarrow$ 1,0 through \reg{rcx}\\ + \ie{} \alert{loop-carried 3 $\rightarrow$ 1} + \end{center} +\end{frame} + + +\begin{frame}{Dependencies, through memory} \todo{} \begin{itemize} - \item Dependency through registers: easy - \item Loop-carried: still fine \item Through memory: indirections, arithmetics, … \item Loop-carried: ROB is finite and small-ish \item Requires comparison of arbitrary formal expressions @@ -12,6 +63,7 @@ \end{itemize} \end{frame} + \begin{frame}{The \staticdeps{} algorithm} \begin{itemize} \item \alert{Unroll} kernel until $\card{\kerK} \geq \card{\text{ROB}} +