To Inline or Not to Inline? Enhanced Inlining Decisions
Peng Zhao and Jose Nelson Amaral
To appear at
16th Workshop on Languages and Compilers for Parallel Computing (LCPC03), College Station, TX, 2-4 October 2003
Full Text, Printable Abstract.
Abstract
The decision to inline a procedure in the Open Research Compiler (ORC)
was based on a temperature heuristics that takes into
consideration the time spent in a procedure and the size of the
procedure. In this paper we describe the trade-off that has to be
worked out to make the correct inlining decisions. We introduce two
new heuristics to enhance the ORC inlining heuristics:
adaptation and cycle_density. With adaptation we are allowed to
vary the temperature threshold and prevent penalizing small
benchmarks. With cycle_density we prevent the inlining of procedures
that have a high temperature in spite of being called infrequently. We
implemented our improved heuristics in the ORC and tested them for the
Intel Itanium Processor Family Platform using the SPEC INT2000
benchmark suite. While adaptation improves the speedup obtained with
inlining across the SPEC2000 suite, cycle_density reduces
significantly both the code growth and compilation time increase
caused by inlining. We then characterize the SPEC INT2000 benchmarks
according to the inlining potential of their function calls. Our
enhancement is released in the ORC 2.0.