Abstract
Optimization techniques such as loop-unrolling and trace-scheduling can result in long straight-line codes. It is, however, unclear how well the register allocation algorithms of current compilers perform on these codes. Compilers may well have been optimized for human written codes, which are likely to have short basic blocks. To evaluate how the state of the art compilers behave on long straight-line codes, we wrote a compiler that implements the simple Belady’s MIN algorithm.
The main contribution of this paper is the evaluation of Belady’s MIN algorithm when used for register allocation for long straight-line codes. These codes were executed on a MIPS R12000 processor. Our results show that applications compiled using Belady’s MIN algorithm run faster than when compiled with the MIPSPro or GCC compiler. In particular, Fast Fourier Transforms (FFTs) of size 32 and 64 run 12% and 33% faster than when compiled using the MIPSPro compiler.
This work was supported by the NSF under grant CCR 01-21401 ITR
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Puschel, M., et al.: SPIRAL: A Generator for Platform-Adapted Libraries of Signal Processing Algorithms. Journal of HPCA (2002)
Xiong, J., Johnson, J., Johnson, R., Padua, D.: SPL: A Language and a Compiler for DSP Algorithms. In: Proc. of PLDI, pp. 298-308 (2001)
Whaley, R., Dongarra, J.: Automatically Tuned Linear Algebra Software. Technical Report UT CS-97-366, University of Tenessee (1997)
Hennessy, J.L., Patterson, D.A.: Computer Architecture: A Quantitative Approach. Morgan Kaufmann Publishers, San Francisco (1996)
Chaitin, G.: Register Allocation and Spilling Via Graph Coloring. In: Proc. of the SIGPLAN Symp. On Compiler Construction, pp. 98–105 (1982)
Garey, M., Johnson, D.: Computers and Intracdtability: A Guide to the Theory of NP-Completeness. W.H. Freeman and Company, New York (1989)
Bergner, P., Dahl, P., Engebretsen, D., Keefe, O.M.T.: Spill code minimization via interference region spilling. In: SIGPLAN Conf. on PLDI, pp. 287-295 (1997)
Briggs, P., et al.: Improvements to Graph Coloring Register Allocation. ACM Trans. on Programming Languages and Systems 6, 428–455 (1994)
George, L., Appel, L.: Iterated Register Coalescing. ACM Trans. on Programming Languages and Systems 18, 300–324 (1996)
Hsu, W., Fischer, C., Goodman, J.: On the Minimization of Load/Stores in Local Register Allocation. IEEE TSE 15, 1252–1260 (1989)
Horwitz, L., karp, R.M., Miller, R.E., Winograd, S.: Index Register Allocation. Journal of the ACM 13, 43–61 (1966)
Kennedy, K.: Index Register Allocation in Straight Line Code and Simple Loops. In: Design and Optimization of Compilers. Prentice Hall, Englewood Cliffs (1972)
Luccio, F.: A Comment on Index Register Allocation. CACM 10, 572–574 (1967)
Belady, L.: A Study of Replacement of Algorithms for a Virtual Storage Computer. IBM Systems Journal 5, 78–101 (1966)
Yotov, K., et al.: A Comparison of Empirical and Model-driven Optimization. In: Proc. of PLDI, pp. 63-76 (2003)
Fischer, C., LeBlanc, T.: Crafting a Compiler. Benjamin Cummings (1987)
Aho, A., Sethi, R., Ullman, J.D.: Compilers, Principles, Techniques, and Tools. Addison-Wesley Publishing Comapny, Reading (1985)
Goodman, J.R., Hsu, W.C.: Code Scheduling and Register Allocation in Large Basic Blocks. In: Proc. of the 2nd ICS, pp. 442–452. ACM Press, New York (1988)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Guo, J., Garzarán, M.J., Padua, D. (2004). The Power of Belady’s Algorithm in Register Allocation for Long Basic Blocks. In: Rauchwerger, L. (eds) Languages and Compilers for Parallel Computing. LCPC 2003. Lecture Notes in Computer Science, vol 2958. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24644-2_24
Download citation
DOI: https://doi.org/10.1007/978-3-540-24644-2_24
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21199-0
Online ISBN: 978-3-540-24644-2
eBook Packages: Springer Book Archive