Are compilers able to detect alternating accesses to arrays and interleave them in memory?
Some work has been done that matches your description. For instance:


Compiler-directed array interleaving for reducing energy in multi-bank memories. by Delaluz, V.  Design Automation Conference, 2002. Proceedings of ASP-DAC 2002. 7th Asia and South Pacific and the 15th International Conference on VLSI Design. Proceedings.


describes a such an optimization.