Path-Sensitive Value-Flow Optimizations of Programs

Rastislav Bodik

Current compiler optimizers are conservative and inflexible. As a result, even "highly optimized" programs execute half of their instructions redundantly, only to recompute previously computed values. Ideally, these values should be remembered and later reused, removing recomputations.

Unfortunately, this reuse strategy fails often. The culprit is intermittent reuse--one that exists only along some execution paths leading to the redundant instruction. This path-specific reuse is frequent, but to  remove it, the optimizer may need to pay the exponential price of optimizing each path separately.

This talk will describe how to defeat this exponential path explosion, in its various forms: how to analyze paths separately only when it matters, via demand analysis; how to generate less path-specific code, via optimal profiling feedback; and how to avoid profiling individual paths, by adding confidence to imprecise profiles. The result is a path-sensitive optimization framework that is powerful enough to remove nearly all redundancies, yet practical enough to permit an industrial-strength implementation.


Thesis

Related papers
Home