If a pointer or array expression, such as a[i ] or *p is assigned and then used, without the possibility of being changed in the interim, we can take advantage of the situation to simplify the DAG. For example, in the code of Exercise 8.5.6, since p is not assigned between the second and fourth statements, the statement e = *p can be replaced by e = c, regardless of what p points to. Revise the DAG-construction algorithm to take advantage of such situations, and apply your algorithm to the code of Example 8.5.6.
Example 8.5.6
Construct the DAG for the basic blocka[i ] = b*p = cd = a[j ] e = *p*p = a[i ]on the assumption thata) p can point anywhere.b) p can point only to b or d
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here