Redundant (Common) Subexpression Elimination

Global Constant Folding and Propagation

Dead Code Elimination

Conditional Pruning

Conditional Reordering

Assignment Elimination Due to Equality

GOTO Chasing

Array Temporary Elimination

10.3.8 Array Temporary Elimination

Computing the offsets for array references is time consuming and may often be eliminated when the value is used:

    	
     	A[I,J] := B * C			T := B * C
     	...				...
     	A[J,I] := A[I,J] + 1		A[J,I] := T + 1
     

This presumes that A and B really are the same variable; that is, they are not both needed later.