Interprocedural constant propagation
- 1 July 1986
- proceedings article
- Published by Association for Computing Machinery (ACM)
- Vol. 21 (7), 152-161
- https://doi.org/10.1145/12276.13327
Abstract
In a compiling system that attempts to improve code for a whole program by optimizing across pro- cedures, the compiler can generate better code for a specific procedure if it knows which variables will have constant values, and what those values will be, when the procedure is invoked. This paper presents a general algorithm for determining for each procedure in a given program the set of inputs that will have known constant values at run time. The precision of the answers provided by this method are dependent on the precision of the local analysis of individual procedures in the program. Since the algorithm is intended for use in a sophisticated software development environment in which local analysis would be provided by the source editor, the quality of the answers will depend on the amount of work the editor performs. Several reasonable strategies for local analysis with different lev- els of complexity and precision are suggested and the results of a prototype implementation in a vec- torizing Fortran compiler are presented.Keywords
This publication has 9 references indexed in Scilit:
- Constant propagation with conditional branchesPublished by Association for Computing Machinery (ACM) ,1985
- Analyzing aliases of reference formal parametersPublished by Association for Computing Machinery (ACM) ,1985
- The impact of interprocedural analysis and optimization on the design of a software development environmentPublished by Association for Computing Machinery (ACM) ,1985
- Efficient computation of flow insensitive interprocedural summary informationPublished by Association for Computing Machinery (ACM) ,1984
- A precise inter-procedural data flow algorithmPublished by Association for Computing Machinery (ACM) ,1981
- Predicting the effects of optimization on a procedure bodyPublished by Association for Computing Machinery (ACM) ,1979
- LINPACK Users' GuidePublished by Society for Industrial & Applied Mathematics (SIAM) ,1979
- An analysis of inline substitution for a structured programming languageCommunications of the ACM, 1977
- A unified approach to global program optimizationPublished by Association for Computing Machinery (ACM) ,1973