Next: 4. Future work
Up: 3. Data-flow analysis
Previous: 3.3 The iterative worklist
We implemented some common analyses 1, here shortly described. The
interested reader can find further details in [1].
- Live variables (backward analysis, union): it computes,
for every point in the program, which variables are alive,
i.e. whose value in the point is used by the following code;
assignments to variables that are not alive can be safely removed by
the program.
- Constant propagation (forward analysis, intersection): it
computes, for every point in the program, which variables have a
constant value that can be determined statically; it allows to
simplify expressions with their values.
- Very busy expressions (backward analysis, intersection): it
computes, for every point in the program, which expressions
appear in all the computations starting from there; in those cases, it
is possible, after further tests, to hoist the expressions.
- Available expressions (forward analysis, intersection): it
computes, for every point in the program, which expressions are
available, i.e. whose values have already been computed; their value
can be available in some register, and can be copied from there.
Suitable pretty printing functions allow the user to see the
results. They can be used even to build optimized code.
Next: 4. Future work
Up: 3. Data-flow analysis
Previous: 3.3 The iterative worklist
Diego
2000-05-17