Unexpected Side E ects of Inline Substitution : A Case

The structure of a program can encode implicit information that changes both the shape and speed of the generated code. Interprocedural transformations like inlining often discard such information; using interpro-cedural data-ow information as a basis for optimization can have the same eeect. In the course of a study on inline substitution with commercial FORTRAN compilers, we encountered unexpected performance problems in one of the programs. This paper describes the speciic problem that we encountered, explores its origins, and examines the ability of several analytical techniques to help the compiler avoid similar problems. The structure of a program can encode implicit information that changes both the shape and speed of the generated code. Interprocedural transformations like inlining often discard such information; using interpro-cedural data-ow information as a basis for optimization can have the same eeect. In the course of a study on inline substitution with commercial FORTRAN compilers, we encountered unexpected performance problems in one of the programs. This paper describes the speciic problem that we encountered, explores its origins, and examines the ability of several analytical techniques to help the compiler avoid similar problems.