skip to main content
Constant Propagation with Conditional BranchesMarch 1991
1991 Technical Report
Publisher:
  • Brown University
  • Department of Computer Science Box 1910 Providence, RI
  • United States
Published:01 March 1991
Bibliometrics
Skip Abstract Section
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 forward 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 in this paper can produce smaller and faster compiled programs. The same algorithms can be used for other kinds of analyses (e.g. type determination). We present four algorithms in this paper, all {\it conservative} 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. A new algorithm is also presented that performs a form of interprocedural data flow analysis in which aliasing information is gathered in conjunction with constant propagation. Several variants of this algorithm are considered.

Cited By

  1. ACM
    Chase D, Wegman M and Zadeck F (2004). Analysis of pointers and structures, ACM SIGPLAN Notices, 39:4, (343-359), Online publication date: 1-Apr-2004.
  2. ACM
    Weise D, Crew R, Ernst M and Steensgaard B Value dependence graphs Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (297-310)
  3. Venkatesh G and Fischer C (2019). SPARE, IEEE Transactions on Software Engineering, 18:4, (304-318), Online publication date: 1-Apr-1992.
  4. ACM
    MacLachlan R The Python compiler for CMU Common Lisp Proceedings of the 1992 ACM conference on LISP and functional programming, (235-246)
  5. ACM
    MacLachlan R (1992). The Python compiler for CMU Common Lisp, ACM SIGPLAN Lisp Pointers, V:1, (235-246), Online publication date: 1-Jan-1992.
  6. Kennedy K, McKinley K and Tseng C (2019). Interactive Parallel Programming using the ParaScope Editor, IEEE Transactions on Parallel and Distributed Systems, 2:3, (329-341), Online publication date: 1-Jul-1991.
  7. ACM
    Kennedy K, McKinley K and Tseng C Analysis and transformation in the ParaScope editor Proceedings of the 5th international conference on Supercomputing, (433-447)
  8. ACM
    Chase D, Wegman M and Zadeck F Analysis of pointers and structures Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation, (296-310)
  9. ACM
    Chase D, Wegman M and Zadeck F (1990). Analysis of pointers and structures, ACM SIGPLAN Notices, 25:6, (296-310), Online publication date: 1-Jun-1990.
  10. ACM
    Venkatesh G A framework for construction and evaluation of high-level specifications for program analysis techniques Proceedings of the ACM SIGPLAN 1989 conference on Programming language design and implementation, (1-12)
  11. ACM
    Venkatesh G (1989). A framework for construction and evaluation of high-level specifications for program analysis techniques, ACM SIGPLAN Notices, 24:7, (1-12), Online publication date: 1-Jul-1989.
  12. ACM
    Cytron R, Ferrante J, Rosen B, Wegman M and Zadeck F An efficient method of computing static single assignment form Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (25-35)
Contributors
  • IBM Thomas J. Watson Research Center
  • Brown University

Recommendations