Patent ID: 8122442

Claim:
A method for transforming access to a structure array, comprising: compiling source code, wherein compiling the source code comprises: identifying the structure array in the source code; performing an object safety analysis to determine whether the structure array is safe for transformation, wherein the object safety analysis comprises an inter-procedural alias class analysis; performing a profitability analysis on the structure array when the structure array is safe for transformation, wherein the profitability analysis comprises: selecting a transformation from a plurality of transformations, wherein the plurality of transformations comprises a pointer based fully splitting transformation, a pointer based partially splitting transformation, and an address based fully splitting transformation, identifying an access count for a first field of the structure array, and identifying an access count for the structure array, wherein the profitability analysis indicates to perform: pointer based partially splitting when the access count for the first field of the structure array is a threshold amount less than the access count for the structure array; address based fully splitting when the access count for the first field of the structure array is a threshold amount greater than the access count for the structure array and the structure array has a single allocation instance; pointer based fully splitting when the access count for the first field of the structure array is a threshold amount greater than the access count for the structure array and pointer arithmetic is not used to access the structure array; and pointer based partially splitting when the access count for the first field of the structure array is a threshold amount greater than the access count for the structure array and pointer arithmetic is used to access the structure array; and performing the selected transformation on the structure array; and storing the compiled code.