Skip to main content

Fast Profile-Based Partial Redundancy Elimination

  • Conference paper
Modular Programming Languages (JMLC 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4228))

Included in the following conference series:

Abstract

Partial Redundancy Elimination (PRE) is a standard program optimization which removes redundant computations via Code Motion. It subsumes and generalizes the optimizations of Global Common Subexpression Elimination (GCSE) and Loop Invariant Code Motion (LICM). Recent work has generalized PRE to become Speculative PRE (SPRE), which uses estimates of execution frequencies to find the optimal places in a program to perform computations. However, the analysis performed by the compiler is computationally intensive and hence impractical for just-in-time (JIT) compilers.

This paper introduces a novel approach which abandons a guarantee of optimality in favour of simplicity and speed of analysis. This new approach, called Isothermal SPRE, achieves results which are close to optimal in practice, yet its analysis time is at least as good as current compiler techniques for code motion. It is a technique suitable for use in JIT compilers.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A., Sethi, R., Ullman, J.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading (1986)

    Google Scholar 

  2. Breuer, M.: Generation of optimal code for expressions via factorization. CACM 12(6), 333–340 (1969)

    MATH  Google Scholar 

  3. Cai, Q., Xue, J.: Optimal and efficient speculation-based partial redundancy elimination. In: CGO 2003: Proceedings of the ACM/IEEE 2003 Symposium on Code Generation and Optimization, pp. 91–104 (2003)

    Google Scholar 

  4. Cocke, J.: Global common subexpression elimination. In: Proceedings of a symposium on compiler optimization, pp. 20–24 (1970)

    Google Scholar 

  5. Dhamdhere, D.: Practical adaptation of the global optimization algorithm of Morel and Renvoise. ACM Transactions on Programming Languages and Systems 13(2), 291–294 (1991)

    Article  Google Scholar 

  6. Horspool, R., Ho, H.: Partial redundancy elimination driven by a cost-benefit analysis. In: Proceedings of the 8th Israeli Conference on Computer Systems and Software Engineering, pp. 111–118 (1997)

    Google Scholar 

  7. Kam, J.B., Ullman, J.D.: Monotone data flow analysis frameworks. Acta Informatica 7, 309–317 (1977)

    Article  MathSciNet  Google Scholar 

  8. Knoop, J., Ruthing, O., Steffen, B.: Lazy code motion. In: PLDI 1992: Proceedings of the ACM SIGPLAN 1992 conference on Programming Language Design and Implementation, pp. 224–234 (1992)

    Google Scholar 

  9. Knoop, J., Ruthing, O., Steffen, B.: Optimal code motion: theory and practice. ACM Transactions on Programming Languages and Systems 16(4), 1117–1155 (1994)

    Article  Google Scholar 

  10. Morel, E., Renvoise, C.: Global optimization by suppression of partial redundancies. CACM 22(2), 96–103 (1979)

    MATH  MathSciNet  Google Scholar 

  11. Morel, E., Renvoise, C.: Interprocedural elimination of partial redundancies. In: Muchnik, S., Jones, N. (eds.) Program Flow Analysis: Theory and Applications, pp. 160–188. Prentice-Hall, Englewood Cliffs (1981)

    Google Scholar 

  12. Muchnik, S.: Advanced Compiler Design and Implementation. Morgan Kaufmann, San Francisco (1997)

    Google Scholar 

  13. Scholz, B., Horspool, N., Knoop, J.: Optimizing for space and time usage with speculative partial redundancy elimination. In: LCTES 2004: Proceedings of ACM SIGPLAN/SIGBED 2004 Conference on Languages, Compilers, and Tools for Embedded Systems, pp. 221–230 (2004)

    Google Scholar 

  14. Standard Performance Evaluation Corporation. Cpu2000 (2006), http://www.spec.org

  15. Stone, H.: Multiprocessor scheduling with the aid of network flow algorithms. IEEE Transactions on Software Engineering SE-3(1), 85–93 (1977)

    Article  Google Scholar 

  16. Wolfe, M.: Partial redundancy elimination is not bidirectional. SIGPLAN Notices 34(6), 43–46 (1999)

    Article  Google Scholar 

  17. Xue, J., Cai, Q.: A lifetime optimal algorithm for speculative pre. ACM Transactions on Architecture and Code Generation (to appear, 2006)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Horspool, R.N., Pereira, D.J., Scholz, B. (2006). Fast Profile-Based Partial Redundancy Elimination. In: Lightfoot, D.E., Szyperski, C. (eds) Modular Programming Languages. JMLC 2006. Lecture Notes in Computer Science, vol 4228. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11860990_22

Download citation

  • DOI: https://doi.org/10.1007/11860990_22

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40927-4

  • Online ISBN: 978-3-540-40928-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics