Honors Compilers G22.3130 Spring 2000 Assignment 7 Optimization Due Tuesday, May 2 Your assignment is to implement an optimization, or several optimizations if you feel ambitious, based on global dataflow analysis. You may choose an optimization described in the Dragon book (e.g. CSE, Copy Propagation, Dead Code Elimination, etc.) or any other that you like. The dataflow information used for this optimization will have been computed, of course, by the code you wrote for assignment 6. Thus, before starting assignment 6, you will need to choose an optimization. The optimization phase will take as input a flow graph representing a procedure and will produce a modified flow graph as output. Your assembly code generator from assignment 5 will then be used to produce the (hopefully) improved code. Output to Turn In ----------------- You will be given a Pointless program to compile. You shold turn in: 1. A printout of the flow graph for each procedure in the program (in the simple format described in assignment 6), both before and after optimization. 2. The assembly code generated with the optimization disabled and with the optimization enabled. 3. The test program will contain calls to the C procedure clock(), to determine how long the program runs for (type "man clock" on a unix machine to see what it does). Submit the running times for the program with and without the optimization enabled.