Abstract
lcc is a new retargetable compiler for ANSI C. Versions for the VAX, Motorola 68020, SPARC, and MIPS are in production use at Princeton University and at AT&T Bell Laboratories. With a few exceptions, little about lcc is unusual --- it integrates several well engineered, existing techniques --- but it is smaller and faster than most other C compilers, and it generates code of comparable quality, lcc's target-independent front end performs a few simple, but effective, optimizations that contribute to good code; examples include simulating register declarations and partitioning switch statement cases into dense tables. It also implements target-independent function tracing and expression-level profiling.
- {1} A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison Wesley, Reading, MA, 1986. Google ScholarDigital Library
- {2} American National Standard Institute, Inc., New York. American National Standards for Information Systems, Programming Language C ANSI X3.159-1989, 1990.Google Scholar
- {3} F. Baskett. The best simple code generation technique for while, for, and do loops. SIGPLAN Notices, 13(4):31-32, Apr. 1978. Google ScholarDigital Library
- {4} J. L. Bentley. Writing Efficient Programs. Prentice Hall, Englewood Cliffs, NJ, 1982. Google ScholarDigital Library
- {5} R. L. Bernstein. Producing good code for the case statement. Software--Practice & Experience, 15(10):1021-1024, Oct. 1985. Google ScholarDigital Library
- {6} Computer Science Division, Department of Electrical Engineering and Computer Science, University of California, Berkeley, CA. UNIX User's Manual, Reference Guide, virtual VAX-11 version edition, Mar. 1984.Google Scholar
- {7} C. W. Fraser. A language for writing code generators. Proceedings of the SIGPLAN '89 Conference on Programming Language Design and Implementation, SIGPLAN Notices, 24(7):238-245, July 1989. Google ScholarDigital Library
- {8} C. W. Fraser and D. R. Hanson. Simple register spilling in a retargetable compiler. Software-Practice & Experience, submitted. Google ScholarDigital Library
- {9} C. W. Fraser and D. R. Hanson. A code generation interface for ANSI C. Software--Practice & Experience, to appear, 1991. Google ScholarDigital Library
- {10} S. L. Graham, P. B. Kessler, and M. K. McKusick. An execution profiler for modular programs. Software--Practice & Experience, 13(8):671-685, Aug. 1983.Google ScholarCross Ref
- {11} R. E. Griswold and M. T. Griswold. The Icon Programming Language. Prentice Hall, Englewood Cliffs, NJ, second edition, 1990. Google ScholarDigital Library
- {12} D. R. Hanson. Simple code optimizations. Software-Practice & Experience, 13(8):745-763, Aug. 1983.Google ScholarCross Ref
- {13} D. R. Hanson. Fast allocation and deallocation of memory based on object lifetimes. Software-Practice & Experience, 20(1):5-12, Jan. 1990. Google ScholarDigital Library
- {14} B. W. Kernighan and D. M. Ritchie. The C Programming Language. Prentice Hall, Englewood Cliffs, NJ, second edition, 1988. Google ScholarDigital Library
- {15} D. E. Knuth. An empirical study of FORTRAN programs. Software--Practice & Experience, 1(2):105-133, Apr. 1971.Google ScholarCross Ref
- {16} R. Sedgewick. Algorithms. Addison Wesley, Reading, MA, 1988. Google ScholarDigital Library
- {17} R. L. Sites. Programming tools: Statement counts and procedure timings. SIGPLAN Notices, 13(12):98-101, Dec. 1978. Google ScholarDigital Library
- {18} Standards Performance Evaluation Corp. SPEC Benchmark Suite Release 1.0, Oct. 1989.Google Scholar
- {19} K. Thompson. A new C compiler. In Proceedings of the Summer 1990 UKUUG Conference, pages 41-51, London, July 1990.Google Scholar
- {20} W. M. Waite. The cost of lexical analysis. Software-Practice & Experience, 16(5):473-488, May 1986. Google ScholarDigital Library
- {21} P. J. Weinberger. Cheap dynamic instruction counting. Bell System Technical Journal, 63(8):1815-1826, Oct. 1984.Google Scholar
Index Terms
- A retargetable compiler for ANSI C
Recommendations
A Retargetable MATLAB-to-C Compiler Exploiting Custom Instructions and Data Parallelism
Special Issue on LCETES, Part 2, Learning, Distributed, and Optimizing CompilersThis article presents a MATLAB-to-C compiler that exploits custom instructions present in state-of-the-art processor architectures and supports semi-automatic vectorization. A parameterized processor model is used to describe the target instruction set ...
A retargetable VLIW compiler framework for DSPs with instruction-level parallelism
A standard design methodology for embedded processors today is the system-on-a-chip design with potentially multiple heterogeneous processing elements on a chip, such as a very long instruction word (VLIW) processor, digital signal processor (DSP), and ...
Comments