Ll. Pollock et Ml. Soffa, INCREMENTAL GLOBAL REOPTIMIZATION OF PROGRAMS, ACM transactions on programming languages and systems, 14(2), 1992, pp. 173-200
Although optimizing compilers have been quite successful in producing
excellent code, two factors that limit their usefulness are the accomp
anying long compilation times and the lack of good symbolic debuggers
for optimized code. One approach to attaining faster recompilations is
to reduce the redundant analysis that is performed for optimization i
n response to edits, and in particular, small maintenance changes, wit
hout affecting the quality of the generated code. Although modular pro
gramming with separate compilation aids in eliminating unnecessary rec
ompilation and reoptimization, recent studies have discovered that mor
e efficient code can be generated by collapsing a modular program thro
ugh procedure inlining. To avoid having to reoptimize the resultant la
rge procedures, this paper presents techniques for incrementally incor
porating changes into globally optimized code. An algorithm is given f
or determining which optimizations are no longer safe after a program
change, and for discovering which new optimizations can be performed i
n order to maintain a high level of optimization. An intermediate repr
esentation is incrementally updated to reflect the current optimizatio
ns in the program. Analysis is performed in response to changes rather
than in preparation for possible changes, so analysis is not wasted i
f an edit has no far-reaching effects. The techniques developed in thi
s paper have also been exploited to improve on the current techniques
for symbolic debugging of optimized code.