Skip to main content

Generalized boxings, congruences and partial inlining

  • Conference paper
  • First Online:
Static Analysis (SAS 1994)

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

Included in the following conference series:

Abstract

We present a new technique for optimizing programs, based on data-flow analysis. The initial goal was to provide a simple way to improve on Leroy and Peyton-Jones' techniques for optimizing boxings (allocations) and unboxings (field selection) away in strongly-typed functional programs. Our techniques achieve this goal, while not needing types any more (so it applies to Lisp as well as to ML), and providing a finer analysis; moreover, our techniques also improve on classical common subexpression elimination. The methods are twofold: intraprocedurally, we use a data-flow analysis technique that propagates congruences on program variables and terms built on these variables; interprocedurally, we help the intraprocedural analysis by inlining, at least partially, all functions whose definitions are known at call sites.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.

    Google Scholar 

  2. B. Alpern, M. N. Wegman, and F. K. Zadeck. Detecting equality of variables in programs. In 15th PoPL, pages 1–11, 1988.

    Google Scholar 

  3. A. Appel. Compiling with Continuations. Cambridge University Press, 1992.

    Google Scholar 

  4. J. Cocke, and J. Schwartz. Programming languages and their compilers: preliminary notes. Technical report, Courant Institute of Mathematical Sciences, New York, 1970. second, revised version.

    Google Scholar 

  5. P. Cousot, and R. Cousot. A constructive version of Tarski's fixpoint theorems. Pacific J. Math., 82(1):43–57, 1979.

    Google Scholar 

  6. R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. An efficient method for computing static single assignment form. In 16th PoPL, pages 25–35, 1989.

    Google Scholar 

  7. K. De Bosschere, S. Debray, D. Gudeman, and S. Kannan. Call forwarding: A simple interprocedural optimization technique for dynamically typed languages. In 21st PoPL, pages 409–420, 1994.

    Google Scholar 

  8. A. Deutsch. A storeless model of aliasing and its abstractions using finite representations of right-regular equivalence relations. In ICCL'92, 1992.

    Google Scholar 

  9. P. K. Downey, R. Sethi, and R. E. Tarjan. Variations on the common subexpression problem. Journal of the ACM, 27(4):758–771, 1980.

    Article  Google Scholar 

  10. J. H. Gallier. Logic for Computer Science — Foundations of Automatic Theorem Proving. John Wiley and Sons, 1987.

    Google Scholar 

  11. J. Goubault. Une implémentation efficace de structures de données ensemblistes, fondée sur le hash-consing. In JFLA '93, 1993.

    Google Scholar 

  12. J. Goubault. HimML: Standard ML with fast sets and maps. In ACM Workshop on ML, 1994.

    Google Scholar 

  13. F. Henglein and J. Jørgensen. Formally optimal boxing. In 21st PoPL, pages 213–226, 1994.

    Google Scholar 

  14. R. Johnson and K. Pingali. Dependence-based program analysis. In PLDI'93, pages 78–89, 1993.

    Google Scholar 

  15. K. W. Kennedy. Node listings applied to data flow analysis. In 3rd PoPL, pages 10–21, 1976.

    Google Scholar 

  16. P. J. Landin. The mechanical evaluation of expressions. Computer Journal, 6(4):308–320, 1964.

    Google Scholar 

  17. X. Leroy. Unboxed objects and polymorphic typing. In 19th PoPL, pages 177–188, 1992.

    Google Scholar 

  18. G. Nelson, and D. C. Oppen. Fast decision procedures based on congruence closure. Journal of the ACM, 27(2):356–364, April 1980.

    Article  Google Scholar 

  19. J. Peterson. Untagged data in tagged environments: Choosing optimal representations at compile time. In FPCA '89, pages 89–99, 1989.

    Google Scholar 

  20. S. L. Peyton-Jones. Unboxed values as first-class citizens. In FPLCA'91. LNCS 523, Springer-Verlag, 1991.

    Google Scholar 

  21. B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Global value numbers and redundant computations. In 15th PoPL, pages 12–27, 1988.

    Google Scholar 

  22. G. L. Steele. Rabbit: A compiler for Scheme. Technical Report MIT AI TR 474, MIT, May 1978.

    Google Scholar 

  23. J.-P. Talpin and P. Jouvelot. The type and effect discipline. In LICS'92, 1992.

    Google Scholar 

  24. L. Trabb Pardo. Set representation and set intersection. Technical report, Stanford University, 1978. PhD thesis.

    Google Scholar 

  25. J. Vitter and P. Flajolet. Average-case analysis of algorithms and data structures. In J. v. Leeuwen, editor, Handbook of Theoretical Computer Science, chapter 9. Elsevier Science Publishers b.v., 1990.

    Google Scholar 

  26. P. Wadler. Deforestation: Transforming programs to eliminate trees. TCS, 73:231–248, 1990.

    Article  Google Scholar 

  27. D. Weise, R. F. Crew, M. Ernst, and B. Steensgard. Value dependence graphs: Representation without taxation. In 21th PoPL, pages 297–310, 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Baudouin Le Charlier

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Goubault, J. (1994). Generalized boxings, congruences and partial inlining. In: Le Charlier, B. (eds) Static Analysis. SAS 1994. Lecture Notes in Computer Science, vol 864. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58485-4_38

Download citation

  • DOI: https://doi.org/10.1007/3-540-58485-4_38

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-58485-8

  • Online ISBN: 978-3-540-49005-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics