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].
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
A. V. Aho, R. Sethi and J. D. Ullman, Compilers — Principles, Techniques and Tools, Addison-Wesley, 1986.
M. Carlsson, personal communication, Jan. 1992.
J. Cocke and J. T. Schwartz, Programming Languages and their Compilers: Preliminary Notes, Second Revised Version, Courant Institute of Mathematical Science, New York, 1970.
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.
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.
S. K. Debray, “QD-Janus: A Prolog Implementation of Janus”, research report, Dept. of Computer Science, The University of Arizona, Tucson, May 1991.
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.
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.
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.
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.
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.
D. H. D. Warren, “An Abstract Prolog Instruction Set”, Technical Note 309, SRI International, Menlo Park, CA, Oct. 1983.
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.
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.
Author information
Authors and Affiliations
Editor information
Rights 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