Skip to main content

Compiler optimizations for low-level redundancy elimination: An application of meta-level prolog primitives

  • Conference paper
  • First Online:

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

Abstract

Much of the work on applications of meta-level primitives in logic programs focusses on high-level aspects such as source-level program transformation, interpretation, and partial evaluation. In this paper, we show how meta-level primitives can be used in a very simple way for low-level code optimization in compilers. The resulting code optimizer is small, simple, efficient, and easy to modify and retarget. An optimizer based on these ideas is currently being used in a compiler that we have developed for Janus [6].

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

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. M. Carlsson, personal communication, Jan. 1992.

    Google Scholar 

  3. J. Cocke and J. T. Schwartz, Programming Languages and their Compilers: Preliminary Notes, Second Revised Version, Courant Institute of Mathematical Science, New York, 1970.

    Google Scholar 

  4. R. Cytron and J. Ferrante, “What's in a Name? or, The Value of Renaming for Parallelism Detection and Storage Allocation”, Proc. 1987 International Conference on Parallel Processing, St. Charles, IL, Aug. 1987.

    Google Scholar 

  5. R. Cytron, J. Ferrante, B. Rosen, and M. Wegman, “Efficiently Computing Static Single Assignment Form and the Control Dependence Graph”, ACM Transactions on Programming Languages and Systems vol. 13 no. 4, pp. 451–490.

    Google Scholar 

  6. S. K. Debray, “QD-Janus: A Prolog Implementation of Janus”, research report, Dept. of Computer Science, The University of Arizona, Tucson, May 1991.

    Google Scholar 

  7. A. Houri and E. Shapiro, “A Sequential Abstract Machine for Flat Concurrent Prolog”, in Concurrent Prolog: Collected Papers, vol. 2, ed. E. Shapiro, pp. 513–574. MIT Press, 1987.

    Google Scholar 

  8. H. J. Komorowski, “Partial Evaluation as a Means for Inferencing Data Structures in an Applicative Language: A Theory and Implementation in the Case of Prolog”, Proc. Ninth ACM Symposium on Principles of Programming Languages, Albuquerque, NM, Jan. 1982.

    Google Scholar 

  9. J. H. Reif and H. R. Lewis, “Symbolic Evaluation and the Global Value Graph”, Proc. Fourth ACM Symp. on Principles of Programming Languages, Jan. 1977, pp. 104–118.

    Google Scholar 

  10. B. K. Rosen, M. N. Wegman, and F. K. Zadeck, “Global Value Numbers and Redundant Computations”, Proc. 1988 ACM Symp. on Principles of Programming Languages, San Diego, CA, Jan. 1988, pp. 12–27.

    Google Scholar 

  11. V. A. Saraswat, K. Kahn, and J. Levy, “Janus: A step towards distributed constraint programming”, in Proc. 1990 North American Conference on Logic Programming, Austin, TX, Oct. 1990, pp. 431–446. MIT Press.

    Google Scholar 

  12. D. H. D. Warren, “An Abstract Prolog Instruction Set”, Technical Note 309, SRI International, Menlo Park, CA, Oct. 1983.

    Google Scholar 

  13. M. N. Wegman and F. K. Zadeck, “Constant Propagation with Conditional Branches”, ACM Transactions on Programming Languages and Systems vol. 13 no. 2, April 1991, pp. 181–210.

    Google Scholar 

  14. W. Wulf, R. K. Johnsson, C. B. Weinstock, S. O. Hobbs, and C. M. Geschke, The Design of an Optimizing Compiler, American Elsevier, New York, 1975.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

A. Pettorossi

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Debray, S.K. (1992). Compiler optimizations for low-level redundancy elimination: An application of meta-level prolog primitives. In: Pettorossi, A. (eds) Meta-Programming in Logic. META 1992. Lecture Notes in Computer Science, vol 649. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-56282-6_8

Download citation

  • DOI: https://doi.org/10.1007/3-540-56282-6_8

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-56282-5

  • Online ISBN: 978-3-540-47505-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics