Inlining as Staged ComputationLast modified: Fri Jun 20 16:04:49 2003 GMT. AuthorsStefan MonnierZhong Shao AbstractInlining and specialization appear in various forms throughout the implementation of modern programming languages. From mere compiler optimizations to sophisticated techniques in partial evaluation, they are omnipresent, yet each application is treated differently. This paper is an attempt at uncovering the relations between inlining (as done in production compilers) and staged computation (as done in partial evaluators) in the hope of bringing together the research advances in both fields. Using a two-level lambda calculus as the intermediate language, we show how to model inlining as a staged computation while avoiding unnecessary code duplication. The new framework allows us to define inlining annotations iformally and to reason about their interactions with module code. In fact, we present a cross-module inlining algorithm that inlines all functions marked inlinable, even in the presence of ML-style parameterized modules.Published
|
Copyright © 1996-2025 The FLINT Group
<flint at cs dot yale dot edu>
Yale University Department of Computer Science |
colophon |