The Journal of Supercomputing

, Volume 23, Issue 1, pp 7–22 | Cite as

Adaptive Optimizing Compilers for the 21st Century

  • Keith D. Cooper
  • Devika Subramanian
  • Linda Torczon


Historically, compilers have operated by applying a fixed set of optimizations in a predetermined order. We call such an ordered list of optimizations a compilation sequence. This paper describes a prototype system that uses biased random search to discover a program-specific compilation sequence that minimizes an explicit, external objective function. The result is a compiler framework that adapts its behavior to the application being compiled, to the pool of available transformations, to the objective function, and to the target machine.

This paper describes experiments that attempt to characterize the space that the adaptive compiler must search. The preliminary results suggest that optimal solutions are rare and that local minima are frequent. If this holds true, biased random searches, such as a genetic algorithm, should find good solutions more quickly than simpler strategies, such as hill climbing.

configurable compilers order of optimization biased random search optimizing compilers 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    M. A. Auslander and M. E. Hopkins. An overview of the PL.8 compiler. SIGPLAN Notices, 17(6):22–31, 1982. Proceedings of the ACM SIGPLAN '82 Symposium on Compiler Construction.Google Scholar
  2. 2.
    J. W. Backus, R. J. Beeber, S. Best, R. Goldberg, L. M. Haibt, H. L. Herrick, R. A. Nelson, D. Sayre, P. B. Sheridan, H. Stern, I. Ziller, R. A. Hughes, and R. Nutt. The FORTRAN automatic coding system. In Proceedings of the Western Joint Computer Conference, pp. 188–198, February 1957.Google Scholar
  3. 3.
    John Backus. The history of Fortran I, II, and III. In R. L. Wexelblat, ed., History of Programming Languages, pp. 25–45. Academic Press, New York, 1981.Google Scholar
  4. 4.
    J. G. Bradley and G. A. Frantz. DSP microprocessor power management: A novel approach. Texas Instruments Technical White Paper, 1998.Google Scholar
  5. 5.
    P. Briggsand K. D. Cooper. Effective partial redundancy elimination. SIGPLAN Notices, 29(6):159–170, 1994. Proceedings of the ACM SIGPLAN '94 Conference on Programming Language Design and Implementation.Google Scholar
  6. 6.
    K. D. Cooper. Why is redundancy elimination hard? Excerpt from talk at Rice Computer Science Affiliates Meeting. Available at, October 2000.Google Scholar
  7. 7.
    K. D. Cooper and T. Harvey. A study of estimated name transitions in Fortran codes. Technical report in preparation, available on the web at, April 2001.Google Scholar
  8. 8.
    K. D. Cooper and N. McIntosh. Enhanced code compression for embedded RISC processors. In Proceedings of the ACM SIGPLAN 99 Conference on Language Design and Implementation, May 1999.Google Scholar
  9. 9.
    K. D. Cooper, P. J. Schielke, and D. Subramanian. Optimizing for reduced code space using genetic algorithms. In Proceedings of the 1999 Workshop on Languages, Compilers, and Tools for Embedded Systems (LCTES), May 1999.Google Scholar
  10. 10.
    J. E. Dennis and V. Torczon. Direct search methods on parallel machines. SIAM Journal on Optimization, 1(4):448–474, 1991.Google Scholar
  11. 11.
    N. G. Fournier. Enhancement of an evolutionary optimising compiler. Master's thesis, Department of Computer Science, University of Manchester, September 1999.Google Scholar
  12. 12.
    T. Granlund and R. Kenner. Eliminating branches using a super optimizer and the GNU C compiler. SIGPLAN Notices, 27(7):341–352, 1992. Proceedings of the ACM SIGPLAN '92 Conference on Programming Language Design and Implementation.Google Scholar
  13. 13.
    J. H. Holland. Adaptation in Natural and Artificial Systems. University of Michigan Press, MI, 1975.Google Scholar
  14. 14.
    M. S. Johnson and T. C. Miller. Effectiveness of a machine-level global optimizer. SIGPLAN Notices, 21(7):99–108, 1986. Proceedings of the ACM SIGPLAN '86 Symposium on Compiler Construction.Google Scholar
  15. 15.
    M. Kandemir, N. Vijaykrishnan, M. J. Irwin, and W. Ye. Influence of compiler optimizations on system power. In Proceedings of the International Symposium on Computer Architecture, June 2000.Google Scholar
  16. 16.
    M. Lam and the SUIF group. Documentation with the SUIF-2 compiler release. Available from the SUIF web site, Scholar
  17. 17.
    L. Lionel and M. Lematre. Branch and bound algorithm selection by performance prediction. In AAAI-1998, 1998.Google Scholar
  18. 18.
    E. S. Lowry and C. W. Medlock. Object code optimization. Communications of the ACM, pp. 13–22, January 1969.Google Scholar
  19. 19.
    H. Massalin. Super optimizer—A look at the smallest program. In Proceedings of the Second International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 122–126. Palo Alto, CA, 1987.Google Scholar
  20. 20.
    S. Minton, M. D. Johnston, A. B. Phillips, and P. Laird. Minimizing conflicts: A heuristic method for constraint-satisfaction and scheduling problems. Artificial Intelligence, 58:161–205, 1992.Google Scholar
  21. 21.
    T. Night. Web site for the Transit Project.Google Scholar
  22. 22.
    A. Nisbet. GAPS: Iterative feedback directed parallelisation using genetic algorithms. In Proceedings of the Workshop on Profile and Feedback Directed Compilation, Paris, FR, June 1998. Workshop held in conjunction with PACT '98.Google Scholar
  23. 23.
    R. G. Scarborough and H. G. Kolsky. Improved optimization of fortran object programs. IBM Journal of Research and Development, 24(6):660–676, 1980.Google Scholar
  24. 24.
    P. J. Schielke. Stochastic Instruction Scheduling. Ph.D. thesis, Rice University, Department of Computer Science, May 2000.Google Scholar
  25. 25.
    Silicon Graphics, Inc. Documentation with the SGI PRO64 compiler release. SGI released the compiler in open-source form during the summer of 2000. Code is available from the company, 2000.Google Scholar
  26. 26.
    J. Thornton and A. Sattar. Using arc weights to improve iterative repair. In AAAI-1998, 1998.Google Scholar
  27. 27.
    V. Tiwari, S. Malik, and A. Wolfe. Compilation techniquesfor low energy: An overview. In Proceedings of the 1994 IEEE Symposium on Low Power Electronics, 1994.Google Scholar
  28. 28.
    V. Tiwari, S. Malik, and A. Wolfe. Power analysis of embedded software: A first step towards software power minimization. IEEE Transactions on VLSI Systems, 2(4):437–445, 1994.Google Scholar
  29. 29.
    V. Torczon. Direct search methods for unconstrained optimization on either parallel or sequential machines. Technical report 92–09. Rice University, Department of Computational and Applied Mathematics, 1992.Google Scholar
  30. 30.
    M. E. Wolf and M. S. Lam. A data locality optimizing algorithm. SIGPLAN Notices, 26(6):30–44, 1991. Proceedings of the ACM SIGPLAN '91 Conference on Programming Language Design and Implementation.Google Scholar
  31. 31.
    W. Wulf, R. K. Johnson, C. B. Weinstock, S. O. Hobbs, and C. M. Geschke. The Design of an Optimizing Compiler, Programming Language Series. American Elsevier Publishing Company, New York, 1975.Google Scholar

Copyright information

© Kluwer Academic Publishers 2002

Authors and Affiliations

  • Keith D. Cooper
    • 1
  • Devika Subramanian
    • 1
  • Linda Torczon
    • 1
  1. 1.Department of Computer ScienceRice UniversityHouston, TX

Personalised recommendations