TCC - A SYSTEM FOR FAST, FLEXIBLE, AND HIGH-LEVEL DYNAMIC CODE GENERATION

Citation
M. Poletto et al., TCC - A SYSTEM FOR FAST, FLEXIBLE, AND HIGH-LEVEL DYNAMIC CODE GENERATION, ACM SIGPLAN NOTICES, 32(5), 1997, pp. 109-121
Citations number
46
Categorie Soggetti
Computer Sciences","Computer Science Software Graphycs Programming
Journal title
Volume
32
Issue
5
Year of publication
1997
Pages
109 - 121
Database
ISI
SICI code
Abstract
tcc is a compiler that provides efficient and high-level access to dyn amic code generation. It implements the 'C (''Tick-C'') programming la nguage, an extension of ANSI C that supports dynamic code generation [ 15]. 'C gives power and flexibility in specifying dynamically generate d code: whereas most other systems use annotations to denote run-time invariants, 'C allows the programmer to specify and compose arbitrary expressions and statements at run time. This degree of control is need ed to efficiently implement some of the most important applications of dynamic code generation, such as ''just in time'' compilers [17] and efficient simulators [10, 48, 46]. The paper focuses on the techniques that allow tee to provide 'C's flexibility and expressiveness without sacrificing run-time code generation efficiency. These techniques inc lude fast register allocation, efficient creation and composition of d ynamic code specifications, and link-time analysis to reduce the size of dynamic code generators. tee also implements two different dynamic code generation strategies, designed to address the tradeoff of dynami c compilation speed versus generated code quality. To characterize the effects of dynamic compilation, we present performance measurements f or eleven programs compiled using tee. On these applications, we measu red performance improvements of up to one order of magnitude. To encou rage further experimentation and use of dynamic code generation, we ar e making the tee compiler available in the public domain. This is, to our knowledge, the first high-level dynamic compilation system to be m ade available.