



























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!




























A. Aho, R. Sethi, and J. Ullman, Addison-Wesley, 1988. (Sections: 10.5, 10.6, 10.9, 10.10) Y Material for the next lecture » “Analysis Techniques for Predicated Code”, R. Johnson and M. Schlansker, MICRO-29, 1996
Dataflow analysis^ – Collection of information that summarizes the creation/destruction of r1 = r2 + r3 values in a program. Used to identify legal r6 = r4 – r5 optimization opportunities.Pick an arbitrary point in the program^ Which VRs contain usefuldata values? (liveness or upward r4 = 4exposed uses) r6 = 8Which definitions may reachthis point? (reaching defns)Which definitions are guaranteed r6 = r2 + r3to reach this point? (available defns) r7 = r4 – r5Which uses below are exposed?(downward exposed uses)
Compute liveness^ Calculate GEN/KILL for each BB r1 = 3^ Calculate IN/OUT for each BB r2 = r3 r3 = r r1 = r1 + 1 r7 = r1 * r2 r4 = r4 + 1 r4 = r3 + r2^ r8 = 8^ r9 = r7 + r
r2 = 0 r7 = 23 r1 = 4 r8 = r7 + 5 r1 = r3 – r8 r3 = r1 * 2
r4 = r3 r8 = 8 r9 = r7 + r