HW3 - HOMEWORK #3 ECE 4750/CS 4420 Computer Architecture...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
HOMEWORK #3 ECE 4750/CS 4420 – Computer Architecture Due Tuesday, December 1 st at midnight Problem 3.1 Register Lifetime [25 points] For this problem, we introduce a scheme whereby every source register specifier in an instruction has an extra register lifetime bit (set by the compiler) which indicates that the corresponding instruction is the last to need that particular register value, i.e., no following instruction will read the register before another instruction overwrites it with a new value. You are now given the following instruction sequence: I 1 : LW R1, 0(R2) I 2 : ADDI R2, R5, #4 I 3 : SUB R4, R1, R5 I 4 : ADD R1, R2, R6 I 5 : LW R5, 0(R4) I 6 : ADD R2, R1, R4 I 7 : SW R4, 0(R1) I 8 : LW R4, 0(R5) (a) Please create a table like the one below and place checks indicating which registers can have their register lifetime (RL) bits set for the code sequence given above. For instructions with only one source operand, use the Src1 column. Instruction # Src1 RL Bit Src2 RL Bit I 1 I 2 I 3 I 4 I 5 I 6 I 7 I 8 (b) In the original physical register file renaming scheme discussed in the class, when can a physical register be safely freed (i.e. put on the free list and reused for new renaming)? Given the register lifetime bits, we now attempt to optimize the register renaming techniques. Assume that we use the register lifetime bits to improve the performance of our machine. Explain concisely any change in the policy for when a physical register can be freed.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
(c) In the following code sequences, an underlined operand denotes that the corresponding register lifetime bit is set. Circle any code sequences for which having register lifetime information could allow the microprocessor to perform register renaming on instructions following I 3 sooner than if we just had the original register-renaming scheme. Assume that the CPLX instruction is a very long-latency operation that takes many cycles to complete. Explain your selections.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/26/2010 for the course ECE 4750 taught by Professor Suh during the Spring '07 term at Cornell University (Engineering School).

Page1 / 5

HW3 - HOMEWORK #3 ECE 4750/CS 4420 Computer Architecture...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online