Optimizing Compilers for Modern Architectures: A Dependence-Based Approach

As machines and languages have become more complicated, compiler technology has necessarily become more sophisticated. With the advent of vector and parallel computers, single-procedure analysis is no longer enough to produce high-quality parallelized code. In this chapter we introduce some of the problems that can be solved with the help of an interprocedural analysis and optimization system. We also present methods for the solution of these problems, summarizing research on interprocedural compilation over the past 15 years.
We begin with a definition of the terms "interprocedural analysis" and "interprocedural optimization." Interprocedural analysis refers to gathering information about the entire program instead of a single procedure. This is usually comparable to the sort of information that a single-procedure data flow analysis system would collect. Examples of interprocedural analysis problems are determining the variables that are modified as side effects of a procedure call and finding whether a given pair of variables might be aliased to one another on entry to a given procedure.
An interprocedural optimization is a program transformation that involves more than one procedure in a program. The most familiar example is inlining, by which the body of a procedure is substituted at the point of invocation. Although interprocedural optimizations typically modify more than one subroutine, it is reasonable to view any optimization that is based on interprocedural knowledge gathered by an interprocedural analysis phase as an interprocedural optimization. However, for the purposes of this chapter we will adhere to the narrower view.