skip to main content
Demand-Driven Interprocedural Constant Propagation: Implementation and EvaluationJune 1995
1995 Technical Report
Publisher:
  • Oregon Graduate Institute School of Science & Engineering
Published:01 June 1995
Bibliometrics
Skip Abstract Section
Abstract

We have developed a hybrid algorithm for interprocedural constant propagation combining two prior methods with a new demand-driven approach. We modified a prior intraprocedural constant propagator to use incrementally in a demand-driven interprocedural framework. We compare our algorithm to three prior interprocedural methods. Burke and Cytron solve the interprocedural constant propagation problem with an algorithm that uses a pessimistic incremental intraprocedural constant propagator to iterate forward and backward over the call graph until no new information is discovered. Wegman and Zadeck solve the intraprocedural constant propagation problem with an optimistic algorithm. Their algorithm solves the sparse conditional constant problem. The interprocedural version of their algorithm links the Static Single Assignment graphs of all procedures together and runs their intraprocedural algorithm over the single SSA graph. Grove and Torczon performed experiments that show Jump Functions combined with procedure summary blocks as described by Callahan et. alare effective at finding interprocedural constants. We show that our interprocedural algorithm, Demand-driven With Incremental Modification (DWIM), is fast and finds the same number of constants as the best interprocedural constant propagator in use today. We know of no implementations of either interprocedural Wegman-Zadeck or Burke-Cytron algorithms. Over a set of standard benchmarks we find 46.4\% more interprocedural constants compared to intraprocedural constants.

Contributors
  • Oregon Health & Science University

Recommendations