Implementation Of Inlining In Stratego

Stratego -- Strategies for Program Transformation
by ArneDeBruijn

August 10, 2001 INF/SCR-01-11 Master thesis, Institute of Information and Computing Sciences, Universiteit Utrecht


All modern compilers provide inlining, an optimization which replaces a func- tion call by the function body. Implementations of inlining are usually focused on speci¯c source languages or on speci¯c algorithms to decide which functions should be inlined. We describe the implementation of a general inlining im- plementation in the program transformation language Stratego. This inliner should be usable for diŽerent source languages and decision algorithms. The implementation separates the analysis and transformation of the program, the traversal of the program and the decision when to do inlining. In addition, the implementation of several other optimizations that are enabled by inlining is discussed in the context of the highly optimizable Pan language.