Abstract
Register allocation is an important optimization in many compilers, but with per-procedure register allocation, it is often not possible to make good use of a large register set. Procedure calls limit the improvement from global register allocation, since they force variables allocated to registers to be saved and restored. This limitation is more pronounced in LISP programs due to the higher frequency of procedure calls. An interprocedural register allocation algorithm is developed by simplifying a version of interprocedural graph coloring. The simplification corresponds to a bottom-up coloring of the interference graph. The scheme is evaluated using a number of LISP programs. The evaluation considers the scheme's limitations and compares these “software register windows” against the hardware register windows used in the Berkeley RISC and SPUR processors.
- 1 AHO, A., HOPCROFT, J., AND ULLMAN, J. Data Structures and Algorithms. Addison-Wesley, Reading, Mass., 1983. Google Scholar
- 2 AHO, A., SETHI, R., AND ULLMAN, J. Compilers: Principles, Techniques, and Tools. Addison- Wesley, Reading, Mass., 1986. Google Scholar
- 3 BASART, E., AND FOLGER, D. RIDGE 32 Architecture--A RISC Variation. In Proceedings of the International Conference on Computer Design VLS! in Computers (Port Chester, N.Y., Oct., 1983). IEEE, New york, 1983.Google Scholar
- 4 BATALI, J., GOODHUE, E., HANSON, C., SHROBE, H., STALLMAN, R., AND SUSSMAN, G. The SCHEME-81 architecture--System and chip. In Proceedings of the 1982 Con{erence on Advanced Research in VLSI (Boston, Mass., Jan. 1982). MIT, Cambridge, Mass., 1982, pp. 69-77.Google Scholar
- 5 BAWDEN, A., GREENBLATT, R., HOLLOWAY, J., KNIGHT, T., MOON, D., AND WEINREB, D. LISP machine progress report. Tech. Rep. Memo 444, MIT Artificial Intelligence Laboratory, Cambridge, Mass., Aug. 1977.Google Scholar
- 6 BERENBAUM, A., DITZEL, D., AND MCLELLAN, H. Architectural innovations in the CRISP microprocessor. In Spring 1987 COMPCON Digest of Papers (San Francisco, Calif., Feb. 1987). IEEE, New York, 1987, pp. 91-95.Google Scholar
- 7 CHAITIN, G. Register allocation and spilling via graph coloring. In Proceedings of the SIGPLAN 82 Symposium on Compiler Construction (Boston, Mass., June 1982). ACM, New York, 1982, pp. 98-105. Google Scholar
- 8 CHARNIAK, E., RIESBECK, C. K., AND MCDERMOTT, D.V. Artificial Intelligence Programming. Erlbaum, Hillsdale, N.J., 1980. Google Scholar
- 9 CHOW, F. A portable machine-independent global optimizer--Design and measurements. Tech. Note 83-254, Ph.D. thesis, Computer Systems Lab., Stanford Univ., Stanford, Calif., Dec. 1983. Google Scholar
- 10 CHOW, F. Minimizing register usage penalty at procedure calls. In Proceedings of the SIGPLAN 88 Conference on Programming Language Design and Implementation (Atlanta, Ga., June 1988). ACM, New York, 1988, pp. 85-94. Google Scholar
- 11 CHOW, F., HIMELSTEIN, M., KILLIAN, E., AND WEBER, L. Engineering a RISC compiler system. In Spring 1986 COMPCON Digest of Papers (San Francisco, Calif., Mar. 1986). IEEE, New York, 1986, pp. 132-137.Google Scholar
- 12 CHOW, F. C., AND HENNESSY, J.L. Register allocation by priority-based coloring. In Proceedings of the SIGPLAN 84 Symposium on Compiler Construction (Montreal, June 1984). ACM, New York, 1984, pp. 222-232. Google Scholar
- 13 CHOW, P. MIPS-X instruction set and programmer's manual. Tech. Rep. CSL-86-289, Stanford, Calif., May 1986. Google Scholar
- 14 COOPER, K., KENNEDY, K., AND TORCZON, L. Interprocedural optimization: Eliminating unnecessary recompilation. In Proceedings of the SIGPLAN 86 Symposium on Compiler Construction (Palo Alto, Calif., June 1986). ACM, New York, 1986, pp. 58-67. Google Scholar
- 15 COUTANT, D., HAMMOND, C., AND KELLY, W. Compilers for the new generation of Hewlett- Packard computers. Hewlett-Packard J. I (Jan. 1986), 4-18.Google Scholar
- 16 DITZEL, D., MCLELLAN, H., AND BERENBAUM, A. Design tradeoffs to support the C programruing language in the CRISP microprocessor. In Proceedings of the 2nd International Conference on Architectural Support for Programming Languages and Operating Systems (Palo Alto, Calif., Oct. 1987). ACM, New York, 1987, pp. 158-163. (Also published in Comput. Arch. News 15, 5.) Google Scholar
- 17 DITZEL, D. R., AND MCLELLAN, H.R. Register allocation for free: The C machine stack cache. In Proceedings of the SIGARCH/SIGPLAN Symposium on Architectural Support for Programming Languages and Operating Systems (Palo Alto, Calif., Mar. 1982). ACM, New York, 1982, pp. 48- 56. (Also published in Comput. Arch. News 10, 2.) Google Scholar
- 18 FISCHER, C. N., AND LEBLANC, R.J. Crafting a Compiler. Benjamin/Cummings, Menlo Park, Calif., 1988. Google Scholar
- 19 FLYNN, M., MITCHELL, C., AND MULDER, H. And now a case for more complex instruction sets. Computer 20, 9 (Sept. 1987), 71-83. Google Scholar
- 20 GABRIEL, R.P. Computer Syster~s Series. Performance and Evaluation o{ LISP Systems. MIT Press, Cambridge, Mass., 1985. Google Scholar
- 21 GRISS, M. L., AND HEARN, A.C. A portable LISP compiler. Softw. Pract. Exper. 11, 6 (June 1981), 541-605.Google Scholar
- 22 GRISS, M. L., BENSON, E., AND HEARN, A.C. Current status of a portable LISP compiler. In Proceedings of the SIGPLAN 82 Symposium on Compiler Construction (Boston, Mass., June 1982). ACM, New York, 1982, pp. 276-283. Google Scholar
- 23 GRISS, M. L., BENSON, E., AND MAGUIRE, G.Q. PSL: A Portable LISP System. In Proceedings of the 1982 Symposium on LISP and Functional Programming (Pittsburgh, Pa., Aug. 1982). ACM, New York, 1982, pp. 88-97. Google Scholar
- 24 HAUCK, E., AND DENT, B. Burroughs' B6500/B7500 stack mechanism. In Computer Structures: Principles and Examples. D. Siewiorek, C. Bell, and A. Newell, Eds., McGraw-Hill, New York, 1982, chap. 16, pp. 244-259.Google Scholar
- 25 HENNESSY, J. L., JOUPPl, N., BASKETT, F., AND GILL, J. MIPS: A VLSI processor architecture. In Proceedings of the CMU Conference on VLSI Systems and Computations (Pittsburgh, Pa., Oct. 1981). CMU, Pittsburgh, Pa., 1981, pp. 337-346.Google Scholar
- 26 HOROWITZ, M., HENNESSY, J., CHOW, P., GULAK, P., ACKEN, J., AGARWAL, A., CHU, C. Y., MCFARLING, S., PRZYBYLSKI, S., RICHARDSON, S., SALZ, A., SIMONI, R., STARK, D., STEENKISTE, P., TZIANC, S., AND WING, M. A 32b microprocessor with on-chip 2K byte instruction cache. In Digest 1987 International Solid-State Circuits Conference (New York, Feb. 1987). IEEE, New York, 1987, pp. 30-31.Google Scholar
- 27 HUGUET, M. A C-oriented register set design. Tech. Rep. CSD-850019, Computer Science Dept., UCLA, June 1985.Google Scholar
- 28 JOHNSSON, R. An approach to global register allocation. Ph.D. thesis, Computer Science Dept., Carnegie-Mellon Univ., Pittsburgh, Pa., Dec. 1975. Google Scholar
- 29 KESSLER, R., PETERSON, J., CARR, H., DUGGAN, G., KNELL, J., AND KROHNFELDT, J. EPIC-- A retargetable highly optimizing LISP compiler. In Proceedings of the SIGPLAN 86 Symposium on Compiler Construction (Palo Alto, Calif., June 1986). ACM, New York, 1986, pp. 118-130. Google Scholar
- 30 LAND, T., AND HUOUET, M. Reduced register saving/restoring in single-window register files. Comput. Arch. News 14, 3 (June 1986), 17-26. Google Scholar
- 31 LARUS, J., AND H1LFINGER, P. Register allocation in the SPUR LISP compiler. In Proceedings of the S1GPLAN 86 Symposium on Compiler Construction (Palo Alto, Calif., June 1986). ACM, New York, 1986, pp. 255-263. Google Scholar
- 32 LEVERETT, B. Register Allocation in Optimizing Compilers. UMI Research Press, Ann Arbor, Mich., 1981. Google Scholar
- 33 MOON, D.A. Architecture of the Symbolics 3600. In Proceedings of the 12th Annual International Symposium on Computer Architecture (Boston, Mass., June 1985). ACM, New York, 1985, pp. 76-83. (Also in SIGARCH Newsl. 13, 3.) Google Scholar
- 34 MULDER, J. Tradeoffs in processor-architecture and data-buffer design. Tech. Rep. CSL-87- 345, Ph.D. thesis, Computer Systems Lab., Stanford Univ., Stanford, Calif., Dec. 1987. Google Scholar
- 35 MURTAGH, T. A less dynamic register allocation scheme for Algol-like languages. In Proceedings of the lOth Annual ACM Symposium on Principles of Programming Languages (Austin, Tex., Jan. 1983). ACM, New York, 1983, pp. 283-289. Google Scholar
- 36 PATTERSON, D. A., AND SEQUIN, C.H. A VLSI RISC. Computer 15, 9 (Sept. 1982), 8-22.Google Scholar
- 37 PENDLETON, J. A design methodology for VLSI processors. Ph.D. thesis, Computer Science Div. (EECS), Un~. of California, Berkeley, Calif., Sept. 1985.Google Scholar
- 38 REINER, A. Cost-minimization in register assignment for retargetable compilers. Tech. Rep. CMU-CS-84-137, Carnegie-Mellon Univ., Pittsburgh, Pa., June 1985.Google Scholar
- 39 RICHARDSON, S., AND GANAPATHI, M. Interprocedural Observations. Stanford Univ., Stanford, Calif., Jan. 1988.Google Scholar
- 40 SITES, R. L. How to use 1000 registers. In Proceedings of the Caltech Conference on VLSI (Pasadena, Calif., Jan. 1979). California Institute of Technology, Pasadena, 1979, pp. 527-532.Google Scholar
- 41 STEELE, G., JR., AND SUSSMAN, G. The dream of a lifetime: A lazy variable extent mechanism. In Conference Record of the 1980 LISP Conference (Stanford Univ., Aug. 1980). Stanford Univ., Stanford, Calif., 1980, pp. 163-172. Google Scholar
- 42 STEENKISTE, P. LISP on a reduced-instruction-set processor: Characterization and optimization. Ph.D. thesis, Computer Systems Lab., Stanford Univ., Stanford, Calif., Mar. 1987. Google Scholar
- 43 STEENKISTE, P., AND HENNESSY, g. LISP on a reduced-instruction-set-processor. In Proceedings of the 1986 Conference on LISP and Functional Programming (Boston, Mass., Aug. 1986). ACM, New York, 1996, pp. 192-201. Google Scholar
- 44 STEENKISTE, P., AND HENNESSY, J. LISP on a reduced-instruction-set processor. Characterization and optimization. Computer 21, 7 (July 1988), 34-45. Google Scholar
- 45 TAYLOR, G. S., HILFINGER, P., LARUS, g., PATTERSON, D., AND ZORN, B. Evaluation of the SPUR Lisp architecture. In Proceedings of the 13th Annual International Symposium on Computer Architecture (Tokyo, June 1986). ACM, New York, 1986, pp. 444-452. Google Scholar
- 46 UNGAR, D. The design and evaluation of a high performance Smalltalk system. Tech. Rep. UCB/CSD 86/287, Ph.D. thesis, Computer Science Div. (EECS), Univ. of California, Berkeley, Mar. 1986. Google Scholar
- 47 UNGAR, D., BLAU, R., FOLEY, P., SAMPLES, D., AND PATTERSON, D. Architecture of SOAR: Smalltalk on a RISC. In Proceedings of the 11th Annual International Symposium on Computer Architecture (Ann Arbor, Mich., June 1984). IEEE, New York, 1984, pp. 188-197. (Also in SIGARCH Newsl. 12, 3.) Google Scholar
- 48 WAITE, W. Code generation. In Compiler Construction--An Advanced Course, F. Bauer, and J. Eickel, Eds. Springer-Verlag, New York, 1976, chap. 3.E, pp. 302-332. Google Scholar
- 49 WALL, D. Global register allocation at link time. In Proceedings o{ the SIGPLAN 86 Symposium on Compiler Construction (Palo Alto, June 1986). ACM, New York, 1986, pp. 264-275. Google Scholar
- 50 WALL, D. Register windows vs. register allocation. In Proceedings of the SIGPLAN 88 Conference on Programming Language Design and Implementation (Atlanta, Ga., June 1988). ACM, New York, 1988. Google Scholar
- 51 WILCOX, T. Generating machine code for high-level programming languages. Ph.D. thesis, Dept. of Computer Science, Cornell Univ., Ithaca, N.Y., Sept. 1971. Google Scholar
- 52 WINSTON, P., AND HORN, B. Lisp. Addison-Wesley, Reading, Mass., 1981. Google Scholar
- 53 WULF, W., JOHNSSON, g., WEINSTOCK, C., HOBBS, S., AND GESCHKE, C. Programming Languages Series. Vol. 2, The Design of an Optimizing Compiler. Elsevier, North-Holland, New York, 1975. Google Scholar
Index Terms
- A simple interprocedural register allocation algorithm and its effectiveness for LISP
Recommendations
Differential register allocation
PLDI '05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementationMicro-architecture designers are very cautious about expanding the number of architected registers (also the register field), because increasing the register field adds to the code size, raises I-cache and memory pressure, complicates processor ...
Differential register allocation
Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementationMicro-architecture designers are very cautious about expanding the number of architected registers (also the register field), because increasing the register field adds to the code size, raises I-cache and memory pressure, complicates processor ...
Comments