exam4-2007

Exam4-2007 - COP5621 Compiler Construction Exam 4 Spring 2007 Name(Please print Put the answers on these sheets Use additional sheets when

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

View Full Document Right Arrow Icon
COP5621 Compiler Construction Exam 4 - Spring 2007 Name: (Please print) Put the answers on these sheets. Use additional sheets when necessary. You can collect 100 points in total for this exam. 1. Which of the following optimizations is considered a peephole optimization ? (mark one ) (4 points) (a) Common-subexpression elimination (b) Code motion (c) Branch chaining (d) Register assignment 2. Subroutine frames (activation records) manage a procedure’s local data. For a typical pro- gramming language implementation, who deallocates the frame? (mark one ) (4 points) (a) Caller (b) Callee (c) Caller and callee (d) None of the above 3. List three local optimizations of your choice and describe what they optimize. (9 points) 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
4. Consider the following program: program P() var p : integer; procedure Q(k : integer) begin R(k, p) end procedure R(i : integer, j : integer); var n : integer procedure T(i : integer) begin ... (* body of T *) end; procedure S() var m : integer begin T(n) end;
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 02/01/2012 for the course COP 5621 taught by Professor Vanengelen during the Spring '11 term at FSU.

Page1 / 8

Exam4-2007 - COP5621 Compiler Construction Exam 4 Spring 2007 Name(Please print Put the answers on these sheets Use additional sheets when

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