The effectiveness of flow analysis for inlining

An interprocedural flow analysis can justify inlining in higher-order languages. In principle, more inlining can be performed as analysis accuracy improves. This paper compares four flow analyses to determine how effectively they justify inlining in practice. The paper makes two contributions. First, the relative merits of the flow analyses are measured with all other variables held constant. The four analyses include two monovariant and two polyvariant analyses that cover a wide range of the accuracy/cost spectrum. Our measurements show that the effectiveness of the inliner improves slightly as analysis accuracy improves, but the improvement is offset by the compile-time cost of the accurate analyses. The second contribution is an improvement to the previously reported inlining algorithm used in our experiments. The improvement causes flow information provided by a polyvariant analysis to be selectively merged. By merging flow information depending on the inlining context, the algorithm is able to expose additional opportunities for inlining. This merging technique can be used in any program transformer justified by a polyvariant flow analysis. The revised algorithm is fully implemented in a production Scheme compiler.

[1]  Andrew A. Chien,et al.  Automatic Interprocedural Optimization for Object-Oriented Languages , 1996 .

[2]  Nevin Heintze,et al.  Set-based analysis of ML programs , 1994, LFP '94.

[3]  R. Kent Dybvig,et al.  An infrastructure for profile-driven dynamic recompilation , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[4]  Andrew Edward Ayers Abstract analysis and optimization of scheme , 1993 .

[5]  Jack W. Davidson,et al.  A study of a C function inliner , 1988, Softw. Pract. Exp..

[6]  R. Kent Dybvig,et al.  Register allocation using lazy saves, eager restores, and greedy shuffling , 1995, PLDI '95.

[7]  Charles Consel,et al.  Polyvariant binding-time analysis for applicative languages , 1993, PEPM '93.

[8]  Scott A. Mahlke,et al.  Profile‐guided automatic inline expansion for C programs , 1992, Softw. Pract. Exp..

[9]  J. Michael Ashley,et al.  A practical and flexible flow analysis for higher-order languages , 1998, TOPL.

[10]  Suresh Jagannathan,et al.  Flow-directed inlining , 1996, PLDI '96.

[11]  Mitchell Wand,et al.  Lightweight closure conversion , 1997, TOPL.

[12]  Barbara G. Ryder,et al.  Static Type Determination and Aliasing for C , 1990 .

[13]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[14]  Williams Ludwell Harrison,et al.  The interprocedural analysis and automatic parallelization of Scheme programs , 1990, LISP Symb. Comput..

[15]  Anders Bondorf,et al.  Efficient Analysis for Realistic Off-Line Partial Evaluation , 1993, J. Funct. Program..

[16]  Olin Shivers,et al.  The semantics of Scheme control-flow analysis , 1991, PEPM '91.

[17]  Charles Consel,et al.  Fixpoint computation for polyvariant static analyses of higher-order applicative programs , 1994, TOPL.

[18]  Suresh Jagannathan,et al.  Effective Flow Analysis for Avoiding Run-Time Checks , 1995, SAS.

[19]  Andrew A. Chien,et al.  Precise Concrete Type Inference for Object-Oriented Languages , 1994, OOPSLA.

[20]  Charles Consel,et al.  A tour of Schism: a partial evaluation system for higher-order applicative languages , 1993, PEPM '93.

[21]  David Grove,et al.  Selective specialization for object-oriented languages , 1995, PLDI '95.

[22]  Olin Shivers,et al.  Control-flow analysis of higher-order languages of taming lambda , 1991 .

[23]  Urs Hölzle,et al.  Type feedback vs. concrete type inference: a comparison of optimization techniques for object-oriented languages , 1995, OOPSLA.

[24]  Marc Feeley,et al.  Storage use analysis and its applications , 1996, ICFP '96.