A system and method of automatically configuring memory in a data processing
system,
including the steps of: receiving source code containing a loop nest, wherein the
loop nest includes data arrays with affine indexes; optimizing source code by relocating
elements from a first array in memory to a second array in memory; and executing
the optimized source code.