Abstract
There are two major goals that must be addressed in a portable back end: a good sequence of instructions must be selected making full use of the capabilities of the machine, and it must be possible to orchestrate target-specific optimizations. A key to the first problem is the language MLRISC, intended in part, to represent the simplest and most basic operations implementable in hardware. The importance of MLRISC is that it provides a common representation for expressing the instruction set of any hardware platform. Bottom-up tree pattern matching with dynamic programming, expressed using succinct and clear specifications of the target instruction set, is used to generate target machine code from an MLRISC program. Target-specific optimizations are performed by parameterizing off-the-shelf optimization modules with concepts common across architectures. The specification of a variety of architectures, and the ability to mix and match sophisticated optimization algorithms are shown. The resulting back end is independent of the intermediate language used in SML/NJ, and could in principle be used in a compiler for a source language quite different from SML. We argue that porting the compiler to a new architecture requires substantially less effort than the existing abstract machine approach, and report significant gains from preliminary architecture description driven optimizations.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Aho, A., Ganapathi, M., and Tjiang, S. Code generation using tree matching and dynamic programming. A CM Transactions on Programming Languages and Systems 11, 4 (Oct. 1989), 491–516.
Appel, A. Compiling with Continuations. Cambridge Univ. Press, 1992.
Appel, A., and MacQueen, D. A Standard ML compiler. In Functional Programming Languages and Computer Architecture, G. Kahn, Ed. Springer-Verlag, 1987, pp. 301–324. LCNS No.274.
Appel, A., and MacQueen, D. Standard ML of New Jersey. In Third Int'l Symp. on Prog. Lang. Implementation and Logic Programming (New York, August 1991), M. Wirsing, Ed., Springer-Verlag. (in press).
Appel, A. W. Concise speculations of locally optimal code generators. Tech. Rep. CS-TR-080-87, Princeton University, Feb. 1987. Dept. of Computer Science.
AT&T. The Standard ML of New Jersey Library, Reference Manual, 0.2 ed. AT&T Bell Laboratories, 600 Mountain Ave, Murray Hill, NJ 07974, 1993.
Birkedal, L., and Welinder, M. Partial evaluation of Standard ML. Master's thesis, University of Copenhagen, October 22 1993. Dept. of Computer Science.
Boyland, J., and Graham, S. Composing tree attributions. In POPL '94: 21st ACM SIGPLAN-SIGACT symposium on principles of programming languages (January 1994), ACM, pp. 375–388. Portland,Oregon.
Chaitin, G. Register allocation and spilling via graph coloring. SIGPLAN Notices 17(6) (June 1982), 98–105. Proceeding of the ACM SIGPLAN '82 Symposium on Compiler Construction.
Fraser, C, Hanson, D., and Proebsting, T. Engineering a simple, efficient code generator generator. In Letters on Programming Languages and Systems (1992), ACM.
George, L., Guillame, F., and Reppy, J. A portable and optimizing back end for the SML/NJ compiler. Tech. Rep. BL112610-931103-38TM, AT&T Bell Laboratories, November 1993.
Goodman, J., and Hsu, W.-C. Code scheduling and register allocation in large basic blocks. In Proceedings of the 1988 International Conference on Supercomputing (July 1988), ACM, pp. 442–452.
Guillaume, F., and George, L. ML—Burg-Documentation, 1.0 ed. AT&T Bell Laboratories, 600 Mountain Ave, Murray Hill, NJ 07974, 1993.
Gwennap, L. Cyrix describes pentium competitor. Microprocessor Report 7, 14 (October 1993), 5–10.
MacQueen, D. Modules for Standard ML. In Proc. 1984 ACM Conf. on LISP and Functional Programming (New York, 1984), ACM Press, pp. 198–207.
Peterson, J. Untagged data in tagged environments: Choosing optimal representations at compile time. In Functional programming languages and computer architecture (September 1989), ACM, pp. 89–99.
Proebsting, T., and Fraser, C. Detecting pipeline structural hazards quickly. In Principles of Programming Languages (January 1994), ACM.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
George, L., Guillame, F., Reppy, J.H. (1994). A portable and optimizing back end for the SML/NJ compiler. In: Fritzson, P.A. (eds) Compiler Construction. CC 1994. Lecture Notes in Computer Science, vol 786. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57877-3_6
Download citation
DOI: https://doi.org/10.1007/3-540-57877-3_6
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57877-2
Online ISBN: 978-3-540-48371-7
eBook Packages: Springer Book Archive