Towards better inlining decisions using inlining trials

  • Authors:
  • Jeffrey Dean;Craig Chambers

  • Affiliations:
  • Department of Computer Science and Engineering, University of Washington;Department of Computer Science and Engineering, University of Washington

  • Venue:
  • LFP '94 Proceedings of the 1994 ACM conference on LISP and functional programming
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

Inlining trials are a general mechanism for making better automatic decisions about whether a routine is profitable to inline. Unlike standard source-level inlining heuristics, an inlining trial captures the effects of optimizations applied to the body of the inlined routine when calculating the costs and benefits of inlining. The results of inlining trials are stored in a persistent database to be reused when making future inlining decisions at similar call sites. Type group analysis can determine the amount of available static information exploited during compilation, and the results of analyzing the compilation of an inlined routine help decide when a future call site would lead to substantially the same generated code as a given inlining trial. We have implemented inlining trials and type group analysis in an optimizing compiler for SELF, and by making wiser inlining decisions we were able to cut compilation time and compiled code space with virtually no loss of execution speed. We believe that inlining trials and type group analysis could be applied effectively to many high-level languages where procedural or functional abstraction is used heavily.