Browse Source

edit regarding optimizing jumps

Jeremy Siek 4 years ago
parent
commit
30105b2b91
1 changed files with 9 additions and 4 deletions
  1. 9 4
      book.tex

+ 9 - 4
book.tex

@@ -4950,9 +4950,11 @@ each block in the program, updating the target of every \code{goto}
 according to the mapping in \code{short-cut}.
 according to the mapping in \code{short-cut}.
 
 
 \begin{exercise}\normalfont
 \begin{exercise}\normalfont
-  Implement the \code{optimize-jumps} pass and check that it remove
-  trivial blocks in a few example programs. Then check that your
-  compiler still passes all of your tests.
+  Implement the \code{optimize-jumps} pass as a transformation from
+  $C_1$ to $C_1$, coming after the \code{explicate-control} pass.
+  Check that \code{optimize-jumps} removes trivial blocks in a few
+  example programs. Then check that your compiler still passes all of
+  your tests.
 \end{exercise}
 \end{exercise}
 
 
 There is another opportunity for optimizing jumps that is apparent in
 There is another opportunity for optimizing jumps that is apparent in
@@ -5008,7 +5010,10 @@ block7952:
 \begin{exercise}\normalfont
 \begin{exercise}\normalfont
   Implement a pass named \code{remove-jumps} that merges basic blocks
   Implement a pass named \code{remove-jumps} that merges basic blocks
   into their preceeding basic block, when there is only one preceeding
   into their preceeding basic block, when there is only one preceeding
-  block. Check that your pass accomplishes this goal on several test
+  block. The pass should translate from psuedo $x86_1$ to pseudo
+  $x86_1$ and it should come immediately after
+  \code{select-instructions}.  Check that \code{remove-jumps}
+  accomplishes the goal of merging basic blocks on several test
   programs and check that your compiler passes all of your tests.
   programs and check that your compiler passes all of your tests.
 \end{exercise}
 \end{exercise}