Due: Midnight pm, Monday December 7th by git commit.
(That is, end of Monday / beginning of Tuesday.)
Home stretch: Project 8 is to read chapter eleven of the text and write code to register-allocate the assembler you produced in project 6 using graph-coloring global (intra-procedural) register allocation.
As always, stick to the module structure given by the text. See below for specific requirements (which are different for undergraduates and graduate students).
To hand in your work, mark your submission commit with git tag "8-reg-alloc".
Your repo should contain a directory named 8-reg-alloc,
that contains:
sources.cm fileIf some phase of your compiler is so broken that you cannot generate assembly code to test your register allocator on, you can try these example assembly files with your register allocator.
The register allocator comes in multiple levels of difficulty.
Undergraduates get full credit for a level-1 no-spill allocator, and extra credit for levels 2–4.
Graduate students get 85% credit for a level-1 no-spill allocator; 92% credit for a level-2 spilling allocator; full credit for a level-3 coalescing allocator; and extra credit for level 4.
Words to the wise: this is, in my opinion, by far the most difficult single piece of the compiler.
"You lose it out here, you're in a world of hurt."
–Olin