Patent ID: 7784037

Claim:
A method, in a data processing system, for compiling source code for execution by one or more processors, comprising: creating a control flow graph for the source code; performing a forward data flow analysis of the control flow graph to initially identify a candidate set of data for explicit fetching and a candidate set of data for storing in cache, based on analyzing each assignment statement in the control flow graph; generating the candidate set of data for explicit fetching, the candidate set of data for storing in the cache, and a initial cached reference set; determining, for each assignment statement fetched from the control flow graph, if there are any aliases in the assignment statement to data in the candidate set of data for explicit fetching; in response to determining that the assignment statement contains aliases to the candidate set of data for explicit fetching, adding to the initial cached reference set both the candidate set of data for storing in cache and the candidate set of data for explicit fetching, marking the candidate set of data for explicit fetching so to exclude it from being placed in cache; in response to determining that the assignment statement does not have aliases to the candidate set of data for explicit fetching, adding the candidate set of data for storing in cache to the initial cached reference set; and compiling the source code using the cached reference set including the results of separating data for storing in cache from data marked for explicit fetching, the compiling further comprising inserting software cache operations into compiled code corresponding to the source code in association with references to data in the cached reference set.