COS 320 - Assignment 11 (optional)

Compiling Techniques, Spring 2012, Princeton University.      Due date: Monday 14 May

Implement an optimization or extension to your Fun compiler. Choose from the list below.

You may work on this project with a partner (i.e., in a team of 2).

Mandatory Registration

By April 30, submit a brief project proposal here. This should list the names of the people on the team, and the project description. If the project description is selected from the list below, then you can just past the text in verbatim if you want.

Project due date

By May 14, submit your project here. Put all your source files (including sources.cm, test inputs, and README) into project.zip. Also upload the README separately. Avoid including binary files (such as .mo files) in your project.zip. Your README should discuss what you accomplished, and how well it worked.

Project suggestions

Coalescing: Implement coalescing graph-coloring that eliminates move instructions.

Unboxing: Implement an unboxing analysis that spreads Fun tuples into separate registers (and thereby achieves multiple-argument functions and assignable local variables).

Garbage Collection: Implement a garbage collector for Fun.

Inline expansion: Implement in-line expansion of functions. See Section 15.4 of the textbook.

Nested functions with closure conversion. See section 15.5 of the textbook.

Tail calls: Implement efficient tail calls. See Section 15.6 of the textbook.

Type definitions: Extend Fun with type and datatype definitions, thereby permitting recursive types such as lists and trees.

Dataflow optimizations: Implement some of the dataflow optimizations from Chapter 17 of the textbook.

Loop optimizations: Implement some of the loop optimizations from Chapter 18 of the textbook.

Static Single-Assignment: Convert Mips code (before register allocation) to the Functional Intermediate Form described in Section 19.7 of the textbook.

Retarget to Pentium: Generate Intel x86 code from your compiler, and get your programs to run native on your own computer.

Retarget to C: Make your compiler translate Fun to C. (Can be combined with the Unboxing optimization.)

Propose your own: Propose a different project, and get it approved before you start working on it.


Back to COS 320 front page