@MISC{Appel94loopheaders, author = {Andrew W. Appel}, title = {Loop headers in lambda-calculus or CPS}, year = {1994} }
Years of Citing Articles
Bookmark
OpenURL
Abstract
As is well known, the introduction of a "loop header" block facilitates the hoisting of loop-invariant code from a loop. But in a -calculus intermediate representation, which has a notion of scope, this transformation is particularly useful. Loop headers with scope also solve an old problem with in-line expansion of recursive functions or loops: if done naively, only the first iteration is inlined. A loop header can encapsulate the loop or recursion for better in-line expansion. This optimization improves performance by about 5% in Standard ML of New Jersey. I have previously described [2, pp. 83--92] the in-line expander of the Standard ML of New Jersey compiler. Its purpose is not merely to avoid functioncall overhead by inserting the bodies of functions in place of their calls. What is more important is that further optimizations (fi-reductions, constant folding, dead variable elimination) are enabled---in -calculus, one fi-reduction may produce more redexes. But the 1992-vintage ...