U Can't Inline This
Function inlining is an established compiler optimization that replaces a call site with the body of the callee. Such optimization eliminates the overhead of pushing/popping the arguments of the function call to/off the stack, leading to performance gains for the optimized program. Typically, an inlining strategy is formulated as a knapsack problem, with a single metric that allows the optimizing compiler to distinguish between a good (i.e., profitable) inline sequence and a bad (i.e., costly) inline sequence. For an inline sequence, the profitability metric is usually the estimated call frequency, while the cost metric is usually the size of the inlined function. While those metrics usually generate a reasonable inline strategy, they ignore any potential post-inlining benefits. Moreover, such setup does not distinguish between a low-cost low-benefit inline strategy and a high-cost high-benefit inline strategy.
In this talk, we will present a novel inlining algorithm that reasons about the potential benefits of post-inlining transformations to eventually create an inline substitution strategy. The algorithm uses abstract interpretation to compute a method summary that lists possible post-inlining transformations that depend on required argument constraints. To compute the constraints for a given context, the algorithm applies the method summary to the value of the arguments passed to the method. Post-inlining transformations that are enabled by each inline substitution contribute to the inlining profitability metric.
The current implementation is highly parameterized. It allows users to specify an inlining budget that correlates with compilation time. Our initial experiments using the DaCapo benchmarks show code generation is of comparable quality with traditional inlining techniques.
Tue 6 Nov Times are displayed in time zone: Guadalajara, Mexico City, Monterrey change
|13:30 - 14:00|
Karim AliUniversity of Alberta
|14:00 - 14:30|
|14:30 - 15:00|
Scott YoungUniversity of New Brunswick