
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

CS 6241 : Homework III
Total points : 75
Due : Beginning of class, Wednesday, March 4th^2009
Important Policies:
Problem I (75 points) [PRE] Our goal in this homework is to understand PRE thoroughly. We will construct our own example for this matter and work through the details.
(a) Construct a control flow graph of about 10 basic blocks populated with a good number of instances of the expression X+Y. Include definitions of X and Y throughout making sure there are ample instances of partially redundant expressions left out. The example must include a combination of loop invariants and some straight line code.
(b) On the above example, fully work out the dataflow framework of PRE showing all the details of the different sets computed.
(c) Using the above sets, show the expressions that were eliminated (because they were redundant) and the ones which were hoisted on edges at basic blocks. Show the new CFG with the new evaluation points for the expressions.
(d) Finally, will PRE completely remove redundancy (consider only lexical redundancy, not value redundancy)? By working through examples, show instances where redundancy is still left out.