Skip to content

Commit

Permalink
clarify register allocation pass vs. function for python, issue #165
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiek committed Sep 13, 2023
1 parent 28d3ca6 commit e4d0d0c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions book.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6681,7 +6681,7 @@ \section{Graph Coloring via Sudoku}
\end{center}

\begin{exercise}\normalfont\normalsize
Implement the \code{allocate\_registers} pass.
Implement the \code{allocate\_registers} \racket{pass}\python{function}.
Create five programs that exercise all aspects of the register
allocation algorithm, including spilling variables to the stack.
%
Expand All @@ -6695,8 +6695,14 @@ \section{Graph Coloring via Sudoku}
\fi}
%
{\if\edition\pythonEd\pythonColor
Run the \code{run-tests.py} script to check whether the
output programs produce the same result as the input programs.
Update the \code{assign\_homes} pass to make use of
the functions you have created to perform register allocation:
\code{uncover\_live}, \code{build\_interference}, and
\code{allocate\_registers}.
Run the \code{run-tests.py} script to check whether the
output programs produce the same result as the input programs.
Inspect the generated x86 programs to make sure that some variables
are assigned to registers.
\fi}
\end{exercise}

Expand Down

0 comments on commit e4d0d0c

Please sign in to comment.