

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Mahlke; Class: Advanced Compilers; Subject: Electrical Engineering And Computer Science; University: University of Michigan - Ann Arbor; Term: Winter 2004;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Setup and install the Trimaran compiler system under Linux. You can do this either on your EECS account, CAEN account, or own system. The Trimaran source code is available on the course webpage (do not use the version on http://www.trimaran.org). See the installation instructions given in class. Verify that your installation is correct by running the benchmarks strcpy and wc, i.e., “tcc –bench strcpy”.
You should also compute the estimated number of execution cycles using the compiler. Using the profile information, the compiler can estimate the running time of an application assuming a perfect memory system. Hint: you just need to toggle a compiler switch to make this happen. There is a program called Sumstat that is built when you make elcor. The compiler creates statistics for each procedure that it compiles and stores the statistics in a file called ELCOR_STATS. Sumstat simply totals the stats. To run sumstat, go into the benchmark intermediate directory, e.g., strcpy_O/elcor_intermediate, and type “Sumstat –total –i ELCOR_STATS”.
The objective of this homework is to implement a Superblock formation algorithm inside Elcor. Superblock formation consists of 2 steps: trace selection and tail duplication.
You will start with a Procedure region. You may assume that the procedure only contains basic blocks, which in turn contain operations. You are given the code
provided in trimaran/elcor/src/eecs583/583sbform.cpp to get you started. The code walks all the basic blocks in a procedure visiting the predecessors and successors of each basic block. There are some other utility functions in there as well to help you out such as the is_backedge() function, and some others to help with creating new blocks.
In your code, provide some debug information to print out the traces that you select and the blocks that are duplicated in tail duplication. There is no prescribed format for this information, so just provide whatever you feel is reasonable.
You should submit a single .tgz file via email to me (or ftp if I get that working) by the due date containing the following:
Grading will be 4-3-2-1. Getting everything to work properly is obviously what you should be striving for, but I’m looking for effort and significant progress, so if you have both of those, you will do ok.
You are encouraged to help each other with the homework, Trimaran usage, internal data structures, etc. But, each person must turn in his/her own implementation.