Improving the ratio of memory operations to floating-point operations in loops
- 1 November 1994
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 16 (6), 1768-1810
- https://doi.org/10.1145/197320.197366
Abstract
Over the past decade, microprocessor design strategies have focused on increasing the computational power on a single chip. Because computations often require more data from cache per floating-point operation than a machine can deliver and because operations are pipelined, idle computational cycles are common when scientific applications are executed. To overcome these bottlenecks, programmers have learned to use a coding style that ensures a better balance between memory references and floating-point operations. In our view, this is a step in the wrong direction because it makes programs more machine-specific. A programmer should not be required to write a new program version for each new machine; instead, the task of specializing a program to a target machine should be left to the compiler. But is our view practical? Can a sophisticated optimizing compiler obviate the need for the myriad of programming tricks that have found their way into practice to improve the performance of the memory hierarchy? In this paper we attempt to answer that question. To do so, we develop and evaluate techniques that automatically restructure program loops to achieve high performance on specific target architectures. These methods attempt to balance computation and memory accesses and seek to eliminate or reduce pipeline interlock. To do this, they estimate statically the balance between memory operations and floating-point operations for each loop in a particular program and use these estimates to determine whether to apply various loop transformations. Experiments with our automatic techniques show that integer-factor speedups are possible on kernels. Additionally, the estimate of the balance between memory operations and computation, and the application of the estimate are very accurate—experiments reveal little difference between the balance achieved by our automatic system that is made possible by hand optimization.Keywords
This publication has 7 references indexed in Scilit:
- Compiler blockability of numerical algorithmsPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2003
- Scalar replacement in the presence of conditional control flowSoftware: Practice and Experience, 1994
- Estimating interlock and improving balance for pipelined architecturesJournal of Parallel and Distributed Computing, 1988
- Automatic translation of FORTRAN programs to vector formACM Transactions on Programming Languages and Systems, 1987
- Loops skewing: The wavefront method revisitedInternational Journal of Parallel Programming, 1986
- Register allocation via coloringComputer Languages, 1981
- The Generation of Optimal Code for Arithmetic ExpressionsJournal of the ACM, 1970