1. A method, in a data processing system, for optimizing program code, comprising: receiving source code for a program in a compiler; transforming the source code into a program statement view of the source code; transforming the program statement view of the source code into a program loop view of the source code; applying one or more code generation optimizations to the program loop view of the source code to generate optimized code; and outputting the optimized code to a compiler for use in generating executable code for execution on a computing device, wherein the one or more code generation optimizations transform the program loop view of the source code into the optimized code while maintaining both program and schedule equivalence between the optimized code and the program statement view of the source code.