For submitting your code, bag.c is here...
The course policy document is here. You are responsible for reading, understanding, and complying with it.
For the course projects, you will be adding optimizations to a compiler for a SWARC subset called SWARB. The first step is to get used to the SWARB compiler front-end. There are three files to look at:
Grab the above source files and compile them using:
cc swarb.c gendumc.c -o swarb
To run the code output by gendumc.c, you will need dumc.h
Familiarize yourself with the vector trees that interface between the fron end and gendumc.c -- this is where you start modifying with the first real project.
The first step is to make a file called frag.c that replaces the dumb C generation of gendumc.c with dumb tuple generation (i.e., builds the basic tuple fragment representation of the input). The handout is posted here as postscript. Although you can freely select the data structure(s) used for the tuples, because this is entirely internal to your code, a list of possible tuple opcodes is given as tup.h.
This phase simply has you computing values for expressions such that any constant-valued tuple expression yields a constant tuple with the resulting value. The handout is posted here as postscript.
Here, you will apply value numbering anaylsis, value propagation, and common subexpression elimination (CSE). The handout is posted here as postscript.
... you can't do the math in this project. Here, you are simply applying a bunch of trivial algebraic identities. The handout is posted here as postscript.
This phase uses a counting scheme to perform dead code elimination within basic blocks. A happy side-effect of the counting scheme is that the counts can be used later for register allocation. The handout is posted here as postscript.
The (slightly revised and corrected) handout is posted here as postscript and the support code, Sb.h is here. This phase is where you finally schedule, allocate registers, and generate MMX code.
The handout is posted here as postscript. Here you do global code straightening and CSE (with minor fixes as needed to your register allocator).
This year is the third time that EE663 is using, and requiring students to use, HTML.
If you are on ECN unix, you should be able to print a formatted hardcopy version of this (or any other) HTML document by selecting the Print option on Mosaic's File menu. You will probably want to set the Format for printed document to PostScript for a pretty hardcopy, or to HTML to see the actual formatting codes in the document.
An introduction to using HTML is http://www.ncsa.uiuc.edu/demoweb/html-primer.html
The undergraduate compiler notes (part of which you have been given as hardcopy in class) are available online:
Some other potentially useful places to visit:
This description was last updated January 27, 1999.