Assignment 7: Integration
Due: See Options below.
Project 7 is to finish your compiler -- allocate the temporary registers to machine registers and do the final assembly of all
the modules so that you can go all the way from Tiger source to
assembler.
You have two options how to proceede:
- Option 1: You can implement yourselves all stages outlined in Apple, Chapters 10-12, which include: performing liveness analysis on the instruction list generated in Project 6., constructing the interference graph, coloring the graph, and performing global register allocation. If you choose this option, you are working for extra credit. Your deadline is Wed., Dec. 8 @ 2PM, and there is no late policy - i.e., you have to turn in whatever you have by that time, and hope you do well on the final.
Read Chapters 10-12, and proceede with the separate steps in order, as outlined in the book, and in the following pages: Liveness, Register Allocation, and Putting it All Together. Look also at the code provided by Apple.
- Option 2: You can reguest ready-to-use modules for the implementation of the liveness analysis, graph construction and register allocation for SPIM. You will still have to integrate these modules with your existing pieces of the compiler and that may require some updates. In order to understand how these modules interact, and what their purpose is, you should read Chapters 10-12, and refer to the programming assingments described in the textbook and at the following pages: Liveness, Register Allocation. You should then implement the final step of Putting it All Together.
If you choose to use existing code, your deadline is Sunday, Dec. 5, @ 2:00PM (deadline extended), and you have the standard late policy of 10pts/day for up to 3 days.
Important Notes:
- If you choose Option 1, and later realize that you cannot complete it, you can email me and request the ready-to-use modules up until the final deadline for Option 2. If you change your mind about how are you going to proceede, your deadline will be determined by the option you implement. You obviously cannot choose Option 1 after you've requested that any code be emailed to you.
- You are not required to consider coalescing or spilling if you are implementing register allocation.
- You can (and should) do as many optimizations as possible, even those which should be implemented as part of the previous assignments. You will get extra points. Provide a list of any optimizations which you have implemented with your final turnin, along with a reference to the testcases for which your optimization(s) occurs.
- You may augment the runtime with additional calls, such as strcmp, if you find that necessary.
You should submit the following files:
- Any altered or new source code, including sources.cm
- A text file describing
- The members of your team
- A description of what new functionality you added to the final compiler for integration.
- List of the optimization you have implemented, and either point to the sample test cases where the particular optimization is visible, or provide your own test cases. We may (and will) test with other cases too.
- Anything you think is of interest about your code.
- An assembler listing for a program or procedure to compute
factorial.
(If your compiler is missing critical phases and cannot
compile a factorial program, then submit some compiled
Tiger program. Insert stubs for pieces you are missing.)
-- Ada