Patent ID: 7555748

Claim:
A method in a data processing system for improving data cache performance, the method comprising: collecting information of at least one global object in a software program during a forward pass to form collected information, wherein the forward pass determines whether the at least one global object is mapped to a smaller size global object relative to the at least one global object, wherein the at least one global object is one of the group consisting of a global dynamic object and a global array, and wherein the collecting comprises: analyzing alias information of the at least one global object using escape analysis; identifying at least one candidate global object for optimization; and collecting at least one computation operating on the at least one candidate global object and at least one store operation modifying the at least one candidate global object; analyzing the collected information after the forward pass to form analyzed information, wherein analyzing the collected information comprises: finalizing the at least one candidate global object based on finalized alias information; selecting at least one candidate computation from the collected at least one computation based on which of the collected at least one computation has a lower pre-computation cost than a current computation cost to form a selected at least one candidate computation; and creating at least one global variable for the selected at least one candidate computation, wherein the selected at least one candidate computation and the at least one global variable are part of the analyzed information; and modifying an intermediate representation of the software program during a backward pass using the analyzed information, wherein modifying the intermediate representation comprises: replacing the selected at least one candidate computation by one of a group consisting of indirect references and indexed references of the at least one global variable; and inserting a store operation for each of the at least one candidate global object at all definition points of the at least one candidate global object in the software program.