Description
At the beginning of class on the due date, submit your solution on Collab.
(20 points).
Given the following control flow graph:
-
-
Compute the reaching definitions for each node in the control-flow graph: create a table that shows the initial values of the IN, OUT, GEN, and KILL sets, along with the results of the first and second iterations of the reaching-definition data-flow analysis algorithm.
-
Compute the reachable uses for each node in the control-flow graph: create a table that shows the initial values of the IN, OUT, GEN, and KILL sets, along with the results of the first and second iterations of the reachable-use data-flow analysis algorithm.
-
Calculate definition-use pairs (du-pairs) for the program: create a table that shows, for each node that contains a use, the du-pairs that involve that use.
- Compute DU-Chains and UD-Chains for the program.
-