Hostname: page-component-586b7cd67f-2brh9 Total loading time: 0 Render date: 2024-12-02T03:35:13.316Z Has data issue: false hasContentIssue false

Compiling for template-based run-time code generation

Published online by Cambridge University Press:  13 May 2003

FREDERICK SMITH
Affiliation:
Dept. of Computer Science, 4130 Upson Hall, Cornell University, Ithaca, NY 14853 (e-mail: [email protected])
DAN GROSSMAN
Affiliation:
Dept. of Computer Science, 4130 Upson Hall, Cornell University, Ithaca, NY 14853 (e-mail: [email protected])
GREG MORRISETT
Affiliation:
Dept. of Computer Science, 4130 Upson Hall, Cornell University, Ithaca, NY 14853 (e-mail: [email protected])
LUKE HORNOF
Affiliation:
Transmeta Corporation, 3940 Freedom Circle, Santa Clara, CA 95054 (e-mail: [email protected])
TREVOR JIM
Affiliation:
AT&T Research, 180 Park Avenue, PO Box 971, Florham Park, NJ 07932 (e-mail: [email protected])
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

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.

Type
Research Article
Copyright
© 2003 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.