Next in line, please!: exploiting the indirect benefits of inlining by accurately predicting further inlining

  • Authors:
  • Andreas Sewe;Jannik Jochem;Mira Mezini

  • Affiliations:
  • Technische Universität Darmstadt, Darmstadt, Germany;Technische Universität Darmstadt, Darmstadt, Germany;Technische Universität Darmstadt, Darmstadt, Germany

  • Venue:
  • Proceedings of the compilation of the co-located workshops on DSM'11, TMC'11, AGERE!'11, AOOPES'11, NEAT'11, & VMIL'11
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Inlining is an important optimization that can lead to significant runtime improvements. When deciding whether or not to inline a method call, a virtual machine has to weigh an increase in compile time against the expected decrease in program time. To estimate the latter, however, state-of-the-art heuristics only use information local to the call-site in question. But inlining is a powerful enabling optimization; by eliminating the actual call it not only offers an obvious direct benefit but also indirect benefits, as information about the method's arguments is propagated from caller to callee. One such indirect benefit is the elimination of guards in case the callee inlines a method called on one of its arguments. In this paper, we show how to enhance an inlining heuristic by accurately predicting where this further inlining occurs--and where not. To do so, we only use information readily available to many virtual machines: the program's dynamic call graph. An implementation based on Jikes RVM demonstrates that this information can be used to successfully exploit inlining's indirect benefits while at the same time reducing compilation effort.