CS 640 Fall 201l
HW #1
Due Sept 27 at classtime

  1. For the code below, perform Local Value Numbering (including constant calculations) and show what redundancies are exposed. Do the same for DAG construction.
    a = x + y
    b = x - y
    c = a * b
    d = x + y
    e = d - c
    f = e + c
    
  2. To do super-local value numbering, the extended basic blocks in a CFG must be found.
  3. For the same two CFGs as question 2, draw spanning trees and IDOM trees. Give the dominance frontiers for the nodes in the graphs.