Abstract
Genetic programming (GP) has a natural niche in the optimization of small but high payo. software heuristics. We use GP to optimize the priority functions associated with two well known compiler heuristics: predicated hyperblock formation, and register allocation. Our system achieves impressive speedups over a standard baseline for both problems. For hyperblock selection, application-specific heuristics obtain an average speedup of 23% (up to 73%) for the applications in our suite. By evolving the compiler’s heuristic over several benchmarks, the best general-purpose heuristic our system found improves the predication algorithm by an average of 25% on our training set, and 9% on a completely unrelated test set. We also improve a well-studied register allocation heuristic. On average, our system obtains a 6% speedup when it specializes the register allocation algorithm for individual applications. The general-purpose heuristic for register allocation achieves a 3% improvement.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
S. G. Abraham, V. Kathail, and B. L. Deitrich. Meld Scheduling: Relaxing Scheduling Constaints Across Region Boundaries. In Proceedings of the 29th Annual International Symposium on Microarchitecture (MICRO-29), pages 308–321, 1996.
D. Bernstein, D. Goldin, and M. G. et. al. Spill Code Minimization Techniques for Optimizing Compilers. In Proceedings of the SIGPLAN’ 89 Conference on Programming Language Design and Implementation, pages 258–263, 1989.
D. Bourgin. http://hpux.u-aizu.ac.jp/hppd/hpux/Languages/codecs-1.0/. Losslessy compression schemes.
B. Calder, D. G. ad Michael Jones, D. Lindsay, J. Martin, M. Mozer, and B. Zorn. Evidence-Based Static Branch Prediction Using Machine Learning. In ACM Transactions on Programming Languages and Systems (ToPLaS-19), volume 19, 1997.
P. Chang, D. Lavery, S. Mahlke, W. Chen, and W. Hwu. The Importance of Prepass Code Scheduling for Superscalar and Superpipelined processors. In IEEE Transactions on Computers, volume 44, pages 353–370, March 1995.
F. C. Chow and J. L. Hennessey. The Priority-Based Coloring Approch to Register Allocation. In ACM Transactions on Programming Languages and Systems (ToPLaS-12), pages 501–536, 1990.
K. Cooper, P. Scheilke, and D. Subramanian. Optimizing for Reduced Code Space using Genetic Algorithms. In Languages, Compilers, Tools for Embedded Systems, pages 1–9, 1999.
C. Gathercole. An Investigation of Supervised Learning in Genetic Programming. PhD thesis, University of Edinburgh, 1998.
P. B. Gibbons and S. S. Muchnick. Efficient Instruction Scheduling for a Pipelined Architecture. In Proceedings of the ACM Symposium on Compiler Construction, volume 21, pages 11–16, 1986.
G. W. Grewal and C. T. Wilson. Mappping Reference Code to Irregular DSPs with the Retargetable, Optimizing Compiler COGEN(T). In International Symposium on Microarchitecture, volume 34, pages 192–202, 2001.
J. Koza. Genetic Programming: On the Programming of Computers by Means of Natural Selection. The MIT Press, 1992.
S. A. Mahlke. Exploiting instruction level parallelism in the presence of branches. PhD thesis, University of Illinois at Urbana-Champaign, Department of Electrical and Computer Engineering, 1996.
M. O’Neill and C. Ryan. Automatic generation of caching algorithms. In K. Miettinen, M. M. Mäkelä, P. Neittaanmäki, and J. Periaux, editors, Evolutionary Algorithms in Engineering and Computer Science, pages 127–134, Jyväskylä, Finland, 30 May–3 June 1999. John Wiley & Sons.
E. Ozer, S. Banerjia, and T. Conte. Unified Assign and Schedule: A New Approach to Scheduling for Clustered Register Filee Microarchitectures.
N. Paterson and M. Livesey. Evolving caching algorithms in C by genetic programming. In J. R. Koza, K. Deb, M. Dorigo, D. B. Fogel, M. Garzon, H. Iba, and R. L. Riolo, editors, Genetic Programming 1997: Proceedings of the Second Annual Conference, pages 262–267, Stanford University, CA, USA, 13–16 July 1997. Morgan Kaufmann.
D. Patterson and J. Hennessy. Computer Architecture: A Quantitative Approach. Morgan Kaufmann, 1995.
B. R. Rau. Iterative Modulo Scheduling: An Algorithm for Software Pipelining Loops. In Proceedings of the 27th Annual International Symposium on Microarchitecture (MICRO-24), November 1994.
C. Ryan and P. Walsh. Automatic conversion of programs from serial to parallel using genetic programming-the paragen system. In Proceedings of ParCo’95. North-Holland, 1995.
Trimaran. http://www.trimaran.org.
N. Warter. Modulo Scheduling with Isomorphic Control Transformations. PhD thesis, University of Illinois at Urbana-Champaign, Department of Electrical and Computer Engineering, 1993.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Stephenson, M., O’Reilly, UM., Martin, M.C., Amarasinghe, S. (2003). Genetic Programming Applied to Compiler Heuristic Optimization. In: Ryan, C., Soule, T., Keijzer, M., Tsang, E., Poli, R., Costa, E. (eds) Genetic Programming. EuroGP 2003. Lecture Notes in Computer Science, vol 2610. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36599-0_22
Download citation
DOI: https://doi.org/10.1007/3-540-36599-0_22
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00971-9
Online ISBN: 978-3-540-36599-0
eBook Packages: Springer Book Archive