Abstract
Data descriptors, which have evolved from Wilcox's value descriptors [16], are a notation for representing run-time data objects at compile time. One of the principal reasons for developing this notation was to aid in the rapid construction of code generators, especially for new microprocessors. Each data descriptor contains a base, a displacement, and a level of indirection. For example, a variable x lying at displacement 28 from base register B3 is represented by this data descriptor: @B3.28. The general form of a data descriptor is @kb.d.i where k gives the number of levels of indirection, b is a base, d is a displacement, and I is an index.
Data descriptors are convenient for representing addressing in Fortran (with static allocation and common blocks), in Pascal and Turing (with automatic allocation and stack frames), and in more general languages such as Euclid and PL/I. This generality of data descriptors allows code generation to be largely independent of the source language.
Data descriptors are able to encode the addressing modes of typical computer architectures such as the IBM 360 and the PDP-11. This generality of data descriptors allows code generation to be largely machine independent.
This paper gives a machine independent method of storage allocation that uses data descriptors. Techniques are given for local optimization of basic arithmetic and addressing code using data descriptors. Target machine dependencies are isolated so that the part of the code generator that handles high-level addressing (such as subscripting) is machine independent. The techniques described in this paper have proven effective in the rapid development of a number of production code generators.
- 1 CARTER, L.R. An analysis of Pascal programs and several block optimizations. Ph.D. dissertation, Dept. of Computer Science, University of Colorado, Boulder, 1980. Google Scholar
- 2 CORDY, J.R. An orthogonal model for code generation. Ph.D. dissertation, Report CSRI-177, Computer Systems Research Institute, University of Toronto, Toronto, Feb. 1985. Google Scholar
- 3 CORDY, J. R., AND HOLT, g.C. Specification of Concurrent Euclid. In Concurrent Euclid, the Unix System, and Tun/s, R. C. Holt, Ed. Addison-Wesley, Reading, Mass., 1983, 243-297.Google Scholar
- 4 CONWAY, R. W., AND WILCOX, T.R. Design and implementation of a diagnostic compiler for PL/I. Commun. ACM 16, 3 (Mar. 1973), 169-179. Google Scholar
- 5 HOLT, R.C. Data descriptors for use by the emitter. Euclid Working Paper 58, Toronto Euclid Workbook, Computer Systems Research Group, University of Toronto, Toronto, June 1978.Google Scholar
- 6 HOLT, R. C., AND CORDY, J. g. The Turing language report. Report CSRG-153, Computer Systems Research Group, University of Toronto, Toronto, Dec. 1983.Google Scholar
- 7 HOLT, R. C., AND HUME, J. N.P. Introduction to Computer Science Using the Turing Programruing Language. Reston, Reston, Va., 1984. Google Scholar
- 8 HOLT, R. C., AND WORTMAN, D.B. A model for implementing Euclid modules and prototypes. ACM Trans. Program. Lang. Syst. 4, 4 (Oct. 1982). Google Scholar
- 9 HOLT, R. C., WORTMAN, D. B., AND CORDY, J. R. S/SL: syntax/semantic language. ACM Trans. Program. Lang. Syst. 4, 2 (April 1982). Google Scholar
- 10 LEWIS, C. Some early results and documentation for Concurrent Euclid. Master's thesis, Dept. of Computer Science, University of Toronto, Toronto, 1982.Google Scholar
- 11 LOWRY, E. AND MEDLOCK, C. Object code optimization. Commun. ACM 12, I (Jan. 1969), 13-22. Google Scholar
- 12 MCCROSKY, C.D. Porting a syntax/semantic language compiler for Concurrent Euclid. Master's thesis, Computer Science Dept., Queen's University, Kingston, Canada, 1981.Google Scholar
- 13 MCKEEMAN, W. M., HORNING, J. J., AND WORTMAN, D.B. A Compiler Generator. Prentice- Hall, Englewood Cliffs, NJ, 1970.Google Scholar
- 14 SPINNEY, B. A technique for the construction of portable production quality code generators. Master's thesis, Dept. of Computer Science, University of Toronto, Toronto, 1981.Google Scholar
- 15 WAITE, W. M. AND GOOS, G. Compiler Construction. Springer-Verlag, New York, 1984. Google Scholar
- 16 WILCOX, T.R. Generating machine code for high-level programming languages. Ph.D. dissertation, Computer Science Dept., Cornell University, Ithaca, NY, 1971. Google Scholar
- 17 WIRTH, N. Design of a Pascal compiler. So{tw. Pract. Exper. 1, 4 (Oct-Dec. 1971), 309-333.Google Scholar
- 18 WULF, W., JOHNSSON, R. K., WEINSTOCK, C. B., HOE~S, S. O., AND GESCHKE, C.M. The Design o{ an Optimizing Compiler. Elsevier North-Holland, New York, 1975. Google Scholar
Index Terms
- Data descriptors: a compile-time model of data and addressing
Recommendations
Compile-time meta-programming in a dynamically typed OO language
DLS '05: Proceedings of the 2005 symposium on Dynamic languagesCompile-time meta-programming allows programs to be constructed by the user at compile-time. Although LISP derived languages have long had such facilities, few modern languages are capable of compile-time meta-programming, and of those that do many of ...
A Performance Evaluation of Local Descriptors
In this paper, we compare the performance of descriptors computed for local interest regions, as, for example, extracted by the Harris-Affine detector [32]. Many different descriptors have been proposed in the literature. It is unclear which descriptors ...
Comments