Constant propagation with conditional branches
- 1 April 1991
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 13 (2), 181-210
- https://doi.org/10.1145/103135.103136
Abstract
Constant propagation is a well-known global flow analysis problem. The goal of constant propagation is to discover values that are constant on all possible executions of a program and to propagate these constant values as far foward through the program as possible. Expressions whose operands are all constants can be evaluated at compile time and the results propagated further. Using the algorithms presented in this paper can produce smaller and faster compiled programs. The same algorithms can be used for other kinds of analyses (e.g., type of determination). We present four algorithms in this paper, all conservitive in the sense that all constants may not be found, but each constant found is constant over all possible executions of the program. These algorithms are among the simplest, fastest, and most powerful global constant propagation algorithms known. We also present a new algorithm that performs a form of interprocedural data flow analysis in which aliasing information is gathered in conjunction with constant progagation. Several variants of this algorithm are considered.Keywords
This publication has 27 references indexed in Scilit:
- Interprocedural analysis vs. procedure integrationInformation Processing Letters, 1989
- Efficient symbolic analysis of programsJournal of Computer and System Sciences, 1986
- Symbolic Program Analysis in Almost-Linear TimeSIAM Journal on Computing, 1982
- The Experimental Compiling SystemIBM Journal of Research and Development, 1980
- Data Flow Analysis for Procedural LanguagesJournal of the ACM, 1979
- Global optimization by suppression of partial redundanciesCommunications of the ACM, 1979
- Program analysis and optimization through kernel-control decompositionActa Informatica, 1978
- An analysis of inline substitution for a structured programming languageCommunications of the ACM, 1977
- Monotone data flow analysis frameworksActa Informatica, 1977
- A Fast and Usually Linear Algorithm for Global Flow AnalysisJournal of the ACM, 1976