hw2 - of the available register set. (a) Show the ILOC code...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 415 Compilers: Problem Set 2 Due date: Wednesday, February 10, in recitation Top-down vs. Bottom-up Register Allocation Source code program main; var a, b, c, d, e, f, g: integer; begin a:=1; b: =a+2 ; c: =b-a ; d: =a+b ; e: =d+1 ; f: =e-c*e ; g: =(
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: of the available register set. (a) Show the ILOC code that would be generated by the top-down algorithm discussed in EAC, i.e., no MAX LIFE consideration, for (MAX LIFE - 1) available registers (k-F registers are available). (b) Show the ILOC code that would be generated by the top-down algorithm dis-cussed in class, i.e., with MAX LIFE consideration, for (MAX LIFE - 1) available registers (k-F registers are available). (c) Show the ILOC code code that would be generated by the bottom-up algorithm discussed in class for (MAX LIFE - 1) available registers (k-F registers are avail-able). 4. Give an ILOC code example, if it exists, where the bottom-up register allocator will insert more spill code than the top-down allocator for the same number of available registers....
View Full Document

Ask a homework question - tutors are online