Patent ID: 8555030

Claim:
A method, comprising: identifying, by a device, array accesses of a plurality of variables in a program code, the program code including a plurality of arrays, each variable, of the plurality of variables, being included in a different array of the plurality of arrays; identifying, by the device and based on the array accesses, array access patterns for each variable of the plurality of variables; determining, by the device, an order of the array access patterns identified for each variable of the plurality of variables; calculating, by the device and based on the order, a plurality of distances between the array access patterns identified for each variable of the plurality of variables; identifying, by the device and for each variable of the plurality of variables, one or more distances, of the plurality of distances, that are equivalent; and sharing, by the device and for each array of the plurality of arrays, address calculations for one or more of the array accesses associated with the one or more distances that are equivalent.