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
To do super-local value numbering, the extended basic blocks in a CFG must be found.
Give the extended basic blocks for these two CFGs.
How can we take advantage of the existence of exended basic blocks in a CFG?
For the same two CFGs as question 2, draw spanning trees and IDOM trees. Give the dominance frontiers for the nodes in the graphs.