Inter-procedural strength reduction is provided by a mechanism of the
present invention to optimize software program. During a forward pass,
the present invention collects information of global variables and
analyzes the information to select candidate computations for
optimization. During a backward pass, the present invention replaces
costly computations with less costly or weaker computations using
pre-computed values and inserts store operations of new global variables
to pre-compute the costly computations at definition points of the global
variables used in the costly computations.