Compiling for template-based run-time code generation
Frederick Smith, Dan Grossman, Greg Morrisett et al. · Journal of Functional Programming · 2003
Cyclone is a type-safe programming language that provides explicit run-time code generation. The Cyclone compiler uses a template-based strategy for run-time code generation in which pre-compiled code fragments are stitched together at run time. This strategy keeps the cost of code generation low, but it requires that optimizations, such as register allocation and code motion, are applied to templates at compile time. This paper describes a principled approach to implementing such optimizations. In particular, we generalize standard flow-graph intermediate representations to support templates, define a mapping from (a subset of) Cyclone to this representation, and describe a dataflow-analysis framework that supports standard optimizations across template boundaries.
Cited by 28 works. doi:10.1017/s095679680200463x Open-access PDF
Authors
References
- Compilers: Principles, Techniques, and Tools
- Advanced Compiler Design and Implementation
- Evaluating future microprocessors : The SimpleScalar tool set
- The multiflow trace scheduling compiler
- The categorical abstract machine
- A retargetable C compiler : design and implementation
- From system F to typed assembly language
- A general approach for run-time specialization and its application to C
- Optimizing ML with run-time code generation
- C: a language for high-level, efficient, and machine-independent dynamic code generation