Jeremy Siek 4 years ago
parent
commit
a7c9474ba3
1 changed files with 17 additions and 19 deletions
  1. 17 19
      book.tex

+ 17 - 19
book.tex

@@ -3042,27 +3042,25 @@ L_{\mathsf{after}}(5)=  \emptyset
 \end{figure}
 
 \begin{exercise}\normalfont
-Implement the \code{uncover-live} pass that computes the live-after
-sets. We recommend storing the live-after sets (a list of a set of
-variables) in the $\itm{info}$ field of the \code{Block} structure.
+Implement the \code{uncover-live} pass. Store the sequence of
+live-after sets in the $\itm{info}$ field of the \code{Block}
+structure.
 %
-We recommend organizing your code to use a helper function that takes
-a list of instructions and an initial live-after set (typically empty)
-and returns the list of live-after sets.
+We recommend creating an auxiliary function that takes a list of
+instructions and an initial live-after set (typically empty) and
+returns the list of live-after sets.
 %
-We recommend creating helper functions to 1) compute the set of
-locations that appear in an argument (of an instruction), 2) compute
-the locations read by an instruction which corresponds to the $R$
-function discussed above, and 3) the locations written by an
-instruction which corresponds to $W$. The \code{callq} instruction
-should include all of the caller-saved registers in its write-set $W$
-because the calling convention says that those registers may be
-written to during the function call. Likewise, the \code{callq}
-instruction should include the appropriate number of argument passing
-registers in its read-set $R$, depending on the arity of the function
-being called. (This is why the abstract syntax for \code{callq}
-includes the arity.)
-
+We also recommend creating auxiliary functions to 1) compute the set
+of locations that appear in an \Arg{}, 2) compute the locations read
+by an instruction (the $R$ function), and 3) the locations written by
+an instruction (the $W$ function). The \code{callq} instruction should
+include all of the caller-saved registers in its write-set $W$ because
+the calling convention says that those registers may be written to
+during the function call. Likewise, the \code{callq} instruction
+should include the appropriate argument-passing registers in its
+read-set $R$, depending on the arity of the function being
+called. (This is why the abstract syntax for \code{callq} includes the
+arity.)
 \end{exercise}