Skip to main content

Genetic Programming Applied to Compiler Heuristic Optimization

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2610))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. 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.

    Google Scholar 

  3. D. Bourgin. http://hpux.u-aizu.ac.jp/hppd/hpux/Languages/codecs-1.0/. Losslessy compression schemes.

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. C. Gathercole. An Investigation of Supervised Learning in Genetic Programming. PhD thesis, University of Edinburgh, 1998.

    Google Scholar 

  9. 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.

    Google Scholar 

  10. 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.

    Google Scholar 

  11. J. Koza. Genetic Programming: On the Programming of Computers by Means of Natural Selection. The MIT Press, 1992.

    Google Scholar 

  12. 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.

    Google Scholar 

  13. 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.

    Google Scholar 

  14. E. Ozer, S. Banerjia, and T. Conte. Unified Assign and Schedule: A New Approach to Scheduling for Clustered Register Filee Microarchitectures.

    Google Scholar 

  15. 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.

    Google Scholar 

  16. D. Patterson and J. Hennessy. Computer Architecture: A Quantitative Approach. Morgan Kaufmann, 1995.

    Google Scholar 

  17. 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.

    Google Scholar 

  18. 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.

    Google Scholar 

  19. Trimaran. http://www.trimaran.org.

  20. N. Warter. Modulo Scheduling with Isomorphic Control Transformations. PhD thesis, University of Illinois at Urbana-Champaign, Department of Electrical and Computer Engineering, 1993.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics