report.tex 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. \documentclass[10pt,a4paper]{article}
  2. \usepackage[latin1]{inputenc}
  3. \usepackage{amsmath}
  4. \usepackage{amsfonts}
  5. \usepackage{amssymb}
  6. \usepackage{booktabs}
  7. \usepackage{graphicx}
  8. \usepackage{listings}
  9. \usepackage{subfigure}
  10. \usepackage{float}
  11. \usepackage{hyperref}
  12. \title{Peephole Optimizer}
  13. \author{Jayke Meijer (6049885), Richard Torenvliet (6138861), Taddeus Kroes
  14. (6054129)}
  15. \begin{document}
  16. \maketitle
  17. \section{Introduction}
  18. The goal of the assignment is to implement the optimization stage of the
  19. compiler. To reach this goal the parser part of the compiler has to be
  20. implemented.
  21. The output of the gcc cross compiler on a c program is our input, the output of
  22. the gcc cross compiler is in the form of Assembly code, but not optimized. Our
  23. assignment includes a number of c programs, an important part of the assignment
  24. is parsing the data. Parsing the data is done with lex and yacc. The lexer is a
  25. program that finds keywords that meets the regular expression provided in the
  26. lexer. After the lexer, the yaccer takes over. Yaccer can turn the keywords in
  27. to an action.
  28. \section{Design \& Implementation}
  29. We decided to implement the optimization in python. We chose this programming
  30. language because python is an easy language to manipulate strings, work
  31. objective ori\"ented etc.
  32. It turns out that a lex and yacc are also implemented in a python version,
  33. named PLY(Python Lex-Yacc). This allows us to use one language, Python, instead
  34. of two i.e. C and Python. Also no debugging is needed in C, only in Python
  35. which makes our assignment more feasible.
  36. \subsection{Design}
  37. \subsection*{Implementation}
  38. This
  39. \subsubsection*{PLY}
  40. \section{Results}
  41. \subsection*{pi.c}
  42. \subsection*{arcron.c}
  43. \subsection*{whet.c}
  44. \subsection*{slalom.c}
  45. \subsection*{clinpack.c}
  46. \section{conclusion}
  47. \end{document}