Code Motion

Original Program P improved Program P') FIG. 1. A simple example of code motion. To insure that P' is semantically equivalent to the original program P, we require that if node w is the movept of t, then: R1. All control paths from the start node s to loc(t) contain node w. R2. The computation is possible at node w; i.e., all quantities required for the computation must be properly defined at node w.