Combining Interprocedural Pointer Analysis and Conditional Constant Propagation

LIMITED DISTRIBUTION NOTICE This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and speciic requests. After outside publication, requests should be lled only by reprints or legally obtained copies of the article (e.g., payment of royalties). Abstract. The information computed by a pointer alias analysis can be used to improve the precision of subsequent analyses, such as conditional constant propagation. Conditional constant propagation can, in turn, discover unexecutable code, which can improve the precision of pointer analysis. This improved alias precision, in turn, may increase the eeectiveness of the conditional constant propagation, and so on. One way to resolved this mutual dependence between conditional constant propagation and pointer alias analysis is to iterate over the two analyses until a xed point is reached. In addition to raising eeciency concerns, the resulting precision may also not be optimal, i.e., a more tightly coupled analysis can have better precision for both alias analysis and conditional constant propagation than iterating over the two analyses. In this work we explore three combinations of pointer alias analysis and conditional constant propagation: a one-pass-over-analyses approach, an iterate-over-analyses approach, and a new algorithm that synthesizes pointer alias analysis and conditional constant propagation. We empirically demonstrate the eeciency and precision of these three approaches on a benchmark suite of 21 C programs ranging in size from 200 { 4,600 LOC.

[1]  Michael Hind,et al.  Flow-sensitive interprocedural constant propagation , 1995, PLDI '95.

[2]  Cliff Click,et al.  Global code motion/global value numbering , 1995, PLDI '95.

[3]  Thomas W. Reps,et al.  Precise Interprocedural Dataflow Analysis with Applications to Constant Propagation , 1995, TAPSOFT.

[4]  Sandeep K. S. Gupta,et al.  SSA-based flow-sensitive type analysis: combining constant and type propagation , 2000, SAC '00.

[5]  Paul Havlak,et al.  Interprocedural symbolic analysis , 1995 .

[6]  GhiyaRakesh,et al.  Context-sensitive interprocedural points-to analysis in the presence of function pointers , 1994 .

[7]  Barbara G. Ryder,et al.  Interprocedural modification side effect analysis with pointer aliasing , 1993, PLDI '93.

[8]  S LamMonica,et al.  Efficient context-sensitive pointer analysis for C programs , 1995 .

[9]  Keith D. Cooper,et al.  Combining analyses, combining optimizations , 1995, TOPL.

[10]  Laurie J. Hendren,et al.  Context-sensitive interprocedural points-to analysis in the presence of function pointers , 1994, PLDI '94.

[11]  Danny Soroker,et al.  Extension mechanisms in Montana , 1997, Proceedings of the Eighth Israeli Conference on Computer Systems and Software Engineering.

[12]  Erik Ruf,et al.  Context-insensitive alias analysis reconsidered , 1995, PLDI '95.

[13]  Robert Metzger,et al.  Interprocedural constant propagation: an empirical study , 1993, LOPL.

[14]  Mark N. Wegman,et al.  Constant propagation with conditional branches , 1985, POPL.

[15]  William Landi,et al.  Undecidability of static analysis , 1992, LOPL.

[16]  Susan Horwitz,et al.  Using static single assignment form to improve flow-insensitive pointer analysis , 1998, PLDI '98.

[17]  Laurie J. Hendren,et al.  Generalized Constant Propagation: A Study in C , 1996, CC.

[18]  M. Burke,et al.  Eecient Flow-sensitive Interprocedural Computation of Pointer-induced Aliases and Side Eeects , 1993 .

[19]  Jong-Deok Choi,et al.  Flow-Insensitive Interprocedural Alias Analysis in the Presence of Pointers , 1994, LCPC.

[20]  Jong-Deok Choi,et al.  Pointer-induced aliasing: a clarification , 1993, SIGP.

[21]  Linda Torczon,et al.  Interprocedural constant propagation: a study of jump function implementation , 1993, PLDI '93.

[22]  Jong-Deok Choi,et al.  Automatic construction of sparse data flow evaluation graphs , 1991, POPL '91.

[23]  Jong-Deok Choi,et al.  Interprocedural pointer alias analysis , 1999, TOPL.

[24]  Michael Hind,et al.  Assessing the Effects of Flow-Sensitivity on Pointer Alias Analyses , 1998, SAS.

[25]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[26]  Anthony Pioli,et al.  Conditional Pointer Aliasing and Constant Propagation , 1999 .

[27]  Michael Wolfe,et al.  Constant propagation: a fresh, demand-driven look , 1994, SAC '94.

[28]  G. Ramalingam,et al.  The undecidability of aliasing , 1994, TOPL.