Hostname: page-component-76fb5796d-x4r87 Total loading time: 0 Render date: 2024-04-28T08:13:33.629Z 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: fms@cs.cornell.edu)
DAN GROSSMAN
Affiliation:
Dept. of Computer Science, 4130 Upson Hall, Cornell University, Ithaca, NY 14853 (e-mail: danieljg@cs.cornell.edu)
GREG MORRISETT
Affiliation:
Dept. of Computer Science, 4130 Upson Hall, Cornell University, Ithaca, NY 14853 (e-mail: jgm@cs.cornell.edu)
LUKE HORNOF
Affiliation:
Transmeta Corporation, 3940 Freedom Circle, Santa Clara, CA 95054 (e-mail: hornof@transmeta.com)
TREVOR JIM
Affiliation:
AT&T Research, 180 Park Avenue, PO Box 971, Florham Park, NJ 07932 (e-mail: trevor@research.att.com)
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.