Ver Fonte

fixed interference example

Jeremy Siek há 9 anos atrás
pai
commit
72e4502791
1 ficheiros alterados com 19 adições e 4 exclusões
  1. 19 4
      book.tex

+ 19 - 4
book.tex

@@ -1937,7 +1937,7 @@ $L_{\mathtt{after}}$ set to make the figure easy to read.
 \begin{figure}[tbp]
 \hspace{20pt}
 \begin{minipage}{0.45\textwidth}
-\begin{lstlisting}
+\begin{lstlisting}[numbers=left]
   (program (v w x y z)
     (movq (int 1) (var v))
     (movq (int 46) (var w))
@@ -2033,9 +2033,22 @@ following.
   register $r$ and every variable $v \in L_{\mathsf{after}}(k)$.
 \end{itemize}
 
-Working from the top to bottom of Figure~\ref{fig:live-eg}, $z$
-interferes with $x$, $y$ interferes with $z$, and $w$ interferes with
-$y$ and $z$.  The resulting interference graph is shown in
+Working from the top to bottom of Figure~\ref{fig:live-eg}, we obtain
+the following interference for the instruction at the specified line
+number.
+\begin{quote}
+Line 2: no interference,\\
+Line 3: $w$ interferes with $v$,\\
+Line 4: $x$ interferes with $w$,\\
+Line 5: $x$ interferes with $w$,\\
+Line 6: $y$ interferes with $w$,\\
+Line 7: $y$ interferes with $w$ and $x$,\\
+Line 8: $z$ interferes with $w$ and $y$,\\
+Line 9: $z$ interferes with $y$, \\
+Line 10: \key{rax} interferes with $y$, \\
+Line 11: no interference. 
+\end{quote}
+The resulting interference graph is shown in
 Figure~\ref{fig:interfere}.
 
 \begin{figure}[tbp]
@@ -2047,6 +2060,7 @@ Figure~\ref{fig:interfere}.
 \node (x) at (4,0)   {$x$};
 \node (y) at (2,-2)  {$y$};
 \node (z) at (4,-2)  {$z$};
+\node (rax) at (0,-2) {\key{rax}};
 
 \draw (v) to (w);
 \foreach \i in {w,x,y} 
@@ -2058,6 +2072,7 @@ Figure~\ref{fig:interfere}.
 }
 \draw (z) to (w);
 \draw (z) to (y);
+\draw (rax) to (y);
 \end{tikzpicture}
 \]
 \caption{Interference graph for the running example.}