Java Reference
In-Depth Information
27. Some computations in a program may be
unreachable
, in the sense that
no control flow path can cause such statements to execute. Using control
flow analysis techniques, determine which statements of a program are
unreachable.
28. The store to memory through
a
in Figure 14.5 appears in the most
deeply nested loop. Describe the analysis and transformations that are
necessary to move the store out of the loop and show the result of the
optimization.
29. Apply the algorithm of Figure 14.51 to the availableexpressionsproblem
given in Figure 14.41 using a table such as the one shown in Figure 14.50
to display the computation. You should obtain the solution shown in
Figure 14.42.
30. Repeat Exercise 29, butmodify the algorithminFigure 14.51 atMarker
84
so that all nodes' solutions are initialized to
⊥
instead of
.Howdoes
your result di
ff
er from the solution shown in Figure 14.42?
31. Apply the algorithmof Figure 14.51 to the livevariablesproblemgiven in
Figure 14.43 using a table such as the one shown in Figure 14.50 to display
the computation. You should obtain the solution shown in Figure 14.44.
32. Consider the data flowproblemgiven in Figure 14.53. Assume that every
transfer function for such a framework is of the form
f
(
in
)
∪
GEN
,where
KILL
and
GEN
are function-specific constants. Prove that
such a data flow framework is
rapid
. Your proof must be based on the
framework, not on the specific flow graph shown in Figure 14.53(a).
=
(
in
−
KILL
)
33. Verify that the data flow framework given in Figure 14.53 obeys the
meet-lattice properties that appear in Figure 14.46.
34. Consider an instance of the availableexpressionsdata flow problem that
is defined for
n
expressions.
(a) Draw the lattice for
n
=
1, clearly labeling
and
⊥
.
(b) Draw the meet lattice for
n
=
.
(c) Describe the meet lattice for an arbitrary value of
n
. What do the
“levels” of the lattice represent?
3, clearly labeling
and
⊥