9.3.2 Use of Available Expressions

Available expressions eliminate recomputations. For example, suppose In(B) contains an expression A op B as does B4 (BB * 12) in Example 7, that is, A op B is available at the beginning of the block as is BB * 12 at the beginning of block B4. Suppose, further, that A op B is used in B (before A or B is redefined). Then we can avoid recomputing A op B in the following way:

Example 8 shows this for the program of Example 7 and for the expressions BB * 12 and A + BB * 12.


Send questions and comments to: Karen Lemone