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}} +