Browse Prior Art Database

The Impact of Interprocedural Analys and Optimization on the Design of a Software Development Environment

IP.com Disclosure Number: IPCOM000128273D
Original Publication Date: 1985-Dec-31
Included in the Prior Art Database: 2005-Sep-15
Document File: 15 page(s) / 52K

Publishing Venue

Software Patent Institute

Related People

Keith D. Cooper: AUTHOR [+5]

Abstract

One of the primary goals of the IR" programming environment project is to mount a concerted attack on the problems of performing interprocedural analysis and optimization in a compiler. Few commercial optimizing compilers employ interprocedural techniques because the cost of gathering the requisite information in a traditional compiler is too great. Computing the side effects of a pro-cedure call requires detailed knowledge of the internals of both the called procedure and any procedures invoked either directly or indirectly from it. Thus, the compiler potentially needs information about the internals of every procedure to determine the side effects of procedure calls, even separately compiled procedures. Gathering this information would require examining the source of every procedure in the program - an expensive process, particu-larly unfortunate since the primary goal of separate com-pilation is to reduce the amount of recompilation required in response to changes in'an individual procedure.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 7% of the total text.

Page 1 of 15

THIS DOCUMENT IS AN APPROXIMATE REPRESENTATION OF THE ORIGINAL.

The Impact of Interprocedural Analys and Optimization on the Design of a Software Development Environment*

Keith D. Cooper Ken Kennedy Linda Torezon

Rice COMP TR84-6

Department of Computer Science Rice University P.O. Box 1892 Houston, TX 77251-1892

*This research has been supported by MM Corporation, and by the NSF through grants MCS 81-04006, MCS 81-21844, and MCS 83-03638. *Report revised April, 1985.

1. Introduction

One of the primary goals of the IR" programming environment project is to mount a concerted attack on the problems of performing interprocedural analysis and optimization in a compiler. Few commercial optimizing compilers employ interprocedural techniques because the cost of gathering the requisite information in a traditional compiler is too great. Computing the side effects of a pro-cedure call requires detailed knowledge of the internals of both the called procedure and any procedures invoked either directly or indirectly from it. Thus, the compiler potentially needs information about the internals of every procedure to determine the side effects of procedure calls, even separately compiled procedures. Gathering this information would require examining the source of every procedure in the program - an expensive process, particu-larly unfortunate since the primary goal of separate com-pilation is to reduce the amount of recompilation required in response to changes in'an individual procedure.

The existence of a software development environ-ment like the IR' programming environment [HoKe 841 changes the compilation process enough to make comput-ing such information palatable. Since all modules are developed and all programs are defined using tools of the environment, these tools can cooperate to record the information necessary to do a good job of interprocedural analysis and optimization. Whenever the compiler needs information about possible side effects of a particular pro-cedure, it can simply extract this information from the environment's central database. Because the only mechan-ism for changing modules or programs is through the tools provided by the environment, the compiler is assured that

To appear In Proceeding8 of A CM SIGPLAN '85 Sym-posium on Language lasue8 in Programming Environmente, June 1085.

it will be notified of any changes. Thus, it can use infor-mation derived from previous analysis with certain knowledge that the information reflects the current state of the program and its procedures,

One of the unique features of the IR" programming environment is that it automatically collects and uses interprocedural data flow information. Recent results [Coop 831 allow the environment to efficiently collect such information. The compiler uses this interprocedural infor-mation as an aid to global program optimization. It also performs interprocedural optimizations such as linkage tailoring and constant folding across procedure boun-darie...