A compiler includes a location-assigning module to optimally allocate
register locations in various memory blocks of a memory during
compilation of a program code in accordance with code proximity of the
program code in accessing the register locations and size of each of the
memory blocks.