Unformatted text preview: variables that could safely be assigned to the same register. What are they? 7. Perform bottom-up register allocation on the code for a machine with three regis-ters. . Show what code would be generated for each 3AC instruction. When choosing registers to allocate, always allocate the lowest-numbered register available. When choosing registers to spill, choose the register holding a value that will be used farthest in the future (in case of a tie, choose the lowest-numbered register). 8. Draw the interference graph for the code. 9. (ECE 573 only) Perform register allocation via graph coloring for the code. If you need to spill, use the code-rewriting approach described in the notes. 1...
View Full Document
- Fall '08
- Graph coloring, register allocation