1. A method in a data processing system for optimizing software program, the method comprising: collecting information for at least one global variable in the software program during a forward pass; analyzing collected information after the forward pass to form analyzed information; and modifying an intermediate representation of the software program during a backward pass using the analyzed information.