Pointer analysis for structured parallel programs

This paper presents a novel interprocedural, flow-sensitive, and context-sensitive pointer analysis algorithm for multithreaded programs that may concurrently update shared pointers. The algorithm is designed to handle programs with structured parallel constructs, including fork-join constructs, parallel loops, and conditionally spawned threads. For each pointer and each program point, the algorithm computes a conservative approximation of the memory locations to which that pointer may point. The algorithm correctly handles a wide range of programming language constructs, including recursive functions, recursively generated parallelism, function pointers, structures, arrays, nested structures and arrays, pointer arithmetic, casts between different pointer types, heap and stack allocated memory, shared global variables, and thread-private global variables. We have implemented the algorithm in the SUIF compiler system and used the implementation to analyze a set of multithreaded programs written in the Cilk programming language. Our experimental results show that the analysis has good precision and converges quickly for our set of Cilk programs.

[1]  David A. Padua,et al.  Automatic detection of nondeterminacy in parallel programs , 1988, PADD '88.

[2]  Mary Lou Soffa,et al.  Concurrency analysis in the presence of procedures using a data-flow framework , 1991, TAV4.

[3]  Barbara G. Ryder,et al.  Static Infinite Wait Anomaly Detection in Polynomial Time , 1990, ICPP.

[4]  Martin C. Rinard,et al.  Lock Coarsening: Eliminating Lock Overhead in Automatically Parallelized Object-Based Programs , 1996, LCPC.

[5]  Mark Stephenson,et al.  Bidwidth analysis with application to silicon compilation , 2000, PLDI '00.

[6]  Martín Abadi,et al.  Types for Safe Locking , 1999, ESOP.

[7]  Nicholas Sterling,et al.  WARLOCK - A Static Data Race Analysis Tool , 1993, USENIX Winter.

[8]  George S. Avrunin,et al.  An efficient algorithm for computing MHP information for concurrent Java programs , 1999, ESEC/FSE-7.

[9]  Martin C. Rinard,et al.  Compositional pointer and escape analysis for Java programs , 1999, OOPSLA '99.

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

[11]  David A. Padua,et al.  Issues in the Optimization of Parallel Programs , 1990, ICPP.

[12]  Susan Horwitz,et al.  Fast and accurate flow-insensitive points-to analysis , 1997, POPL '97.

[13]  Johann Blieberger,et al.  Symbolic Data Flow Analysis for Detecting Deadlocks in Ada Tasking Programs , 2000, Ada-Europe.

[14]  Anne Rogers,et al.  Software caching and computation migration in Olden , 1995, PPOPP '95.

[15]  Robert O'Callahan,et al.  Lackwit: A Program Understanding Tool Based on Type Inference , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[16]  David A. Padua,et al.  Event synchronization analysis for debugging parallel programs , 1989, Proceedings of the 1989 ACM/IEEE Conference on Supercomputing (Supercomputing '89).

[17]  Monica S. Lam,et al.  Efficient context-sensitive pointer analysis for C programs , 1995, PLDI '95.

[18]  Katherine A. Yelick,et al.  Optimizing parallel programs with explicit synchronization , 1995, PLDI '95.

[19]  Michael Hind,et al.  Pointer analysis: haven't we solved this problem yet? , 2001, PASTE '01.

[20]  Seth Copen Goldstein,et al.  BitValue Inference: Detecting and Exploiting Narrow Bitwidth Computations , 2000, Euro-Par.

[21]  Martin C. Rinard,et al.  Symbolic bounds analysis of pointers, array indices, and accessed memory regions , 2005, TOPL.

[22]  Barbara Liskov,et al.  Reducing cross domain call overhead using batched futures , 1994, OOPSLA 1994.

[23]  Urs Hölzle,et al.  Removing unnecessary synchronization in Java , 1999, OOPSLA '99.

[24]  Edith Schonberg,et al.  Detecting access anomalies in programs with critical sections , 1991, PADD '91.

[25]  Chau-Wen Tseng,et al.  Compiler optimizations for eliminating barrier synchronization , 1995, PPOPP '95.

[26]  Jong-Deok Choi,et al.  Race Frontier: reproducing data races in parallel-program debugging , 1991, PPOPP '91.

[27]  Antti Valmari A stubborn attack on state explosion , 1992, Formal Methods Syst. Des..

[28]  Charles E. Leiserson,et al.  Detecting data races in Cilk programs that use locks , 1998, SPAA '98.

[29]  Lori A. Clarke,et al.  Data flow analysis for verifying properties of concurrent programs , 1994, SIGSOFT '94.

[30]  Laura K. Dillon,et al.  Using symbolic execution for verification of Ada tasking programs , 1990, TOPL.

[31]  Ken Kennedy,et al.  Analysis of event synchronization in a parallel programming tool , 1990, PPOPP '90.

[32]  Csaba Andras Moritz,et al.  FlexCache: A Framework for Flexible Compiler Generated Data Caching , 2000, Intelligent Memory Systems.

[33]  Martin C. Rinard,et al.  Synchronization transformations for parallel computing , 1999, POPL '97.

[34]  Lori A. Clarke,et al.  Data flow analysis of concurrent systems that use the rendezvous model of synchronization , 1991, TAV4.

[35]  Marvin Theimer,et al.  Using threads in interactive systems: a case study , 1993, SOSP '93.

[36]  Jaejin Lee,et al.  Hiding relaxed memory consistency with compilers , 2000, Proceedings 2000 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.PR00622).

[37]  Jong-Deok Choi,et al.  Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects , 1993, POPL '93.

[38]  Matteo Frigo,et al.  The implementation of the Cilk-5 multithreaded language , 1998, PLDI.

[39]  Vivek Sarkar Analysis and Optimization of Explicitly Parallel Programs Using the Parallel Program Graph Representation , 1997, LCPC.

[40]  Jaspal Subhlok,et al.  Static analysis of low-level synchronization , 1988, PADD '88.

[41]  Atanas Rountev,et al.  Off-line variable substitution for scaling points-to analysis , 2000, PLDI '00.

[42]  John H. Reppy,et al.  Higher-Order Concurrency , 1992 .

[43]  Ken Kennedy,et al.  Compile-time detection of race conditions in a parallel program , 1989, ICS '89.

[44]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multi-threaded programs , 1997, TOCS.

[45]  Barton P. Miller,et al.  Improving the accuracy of data race detection , 1991, PPOPP '91.

[46]  Antti Valmari,et al.  A stubborn attack on state explosion , 1990, Formal Methods Syst. Des..

[47]  Barbara G. Ryder,et al.  A schema for interprocedural modification side-effect analysis with pointer aliasing , 2001, TOPL.

[48]  Richard N. Taylor,et al.  A general-purpose algorithm for analyzing concurrent programs , 1983, CACM.

[49]  Emin Gün Sirer,et al.  Static Analyses for Eliminating Unnecessary Synchronization from Java Programs , 1999, SAS.

[50]  Martin C. Rinard,et al.  Symbolic bounds analysis of pointers, array indices, and accessed memory regions , 2000, PLDI '00.

[51]  Martin C. Rinard,et al.  A parameterized type system for race-free Java programs , 2001, OOPSLA '01.

[52]  Barbara G. Ryder,et al.  A safe approximate algorithm for interprocedural aliasing , 1992, PLDI '92.

[53]  Reinhard Wilhelm,et al.  Solving shape-analysis problems in languages with destructive updating , 1998, TOPL.

[54]  Erik Ruf,et al.  Effective synchronization removal for Java , 2000, PLDI '00.

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

[56]  James R. Larus,et al.  Application-specific protocols for user-level shared memory , 1994, Proceedings of Supercomputing '94.

[57]  BlanchetBruno Escape analysis for object-oriented languages , 1999 .

[58]  C RinardMartin,et al.  Pointer analysis for structured parallel programs , 2003 .

[59]  Csaba Andras Moritz,et al.  Parallelizing applications into silicon , 1999, Seventh Annual IEEE Symposium on Field-Programmable Custom Computing Machines (Cat. No.PR00375).

[60]  Lars Ole Andersen,et al.  Program Analysis and Specialization for the C Programming Language , 2005 .

[61]  Rajeev Barua,et al.  Maps: a compiler-managed memory system for raw machines , 1999, ISCA.

[62]  K. Rustan M. Leino,et al.  Extended static checking , 1998, PROCOMET.

[63]  Barbara G. Ryder,et al.  Non-concurrency analysis , 1993, PPOPP '93.

[64]  Martin C. Rinard,et al.  Lock Coarsening: Eliminating Lock Overhead in Automatically Parallelized Object-Based Programs , 1998, J. Parallel Distributed Comput..

[65]  George S. Avrunin,et al.  A conservative data flow algorithm for detecting all pairs of statements that may happen in parallel , 1998, SIGSOFT '98/FSE-6.

[66]  Olivier Tardieu,et al.  Ultra-fast aliasing analysis using CLA: a million lines of C code in a second , 2001, PLDI '01.

[67]  Stephen N. Freund,et al.  Type-based race detection for Java , 2000, PLDI '00.

[68]  Alan W. Biermann,et al.  Automatic Program Construction Techniques , 1984 .

[69]  Dennis Shasha,et al.  Efficient and correct execution of parallel programs that share memory , 1988, TOPL.

[70]  Martin C. Rinard,et al.  Analysis of Multithreaded Programs , 2001, SAS.

[71]  Katherine A. Yelick,et al.  Analyses and Optimizations for Shared Address Space Programs , 1996, J. Parallel Distributed Comput..

[72]  Bernhard Steffen,et al.  Parallelism for Free : E cient and Optimal Bitvector Analyses for Parallel Programs , 1996 .

[73]  David A. Padua,et al.  A Constant Propagation Algorithm for Explicitly Parallel Programs , 2004, International Journal of Parallel Programming.

[74]  Pierre Wolper,et al.  A Partial Approach to Model Checking , 1994, Inf. Comput..

[75]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[76]  Manuvir Das,et al.  Unification-based pointer analysis with directional assignments , 2000, PLDI '00.

[77]  James C. Corbett,et al.  Evaluating Deadlock Detection Methods for Concurrent Software , 1996, IEEE Trans. Software Eng..

[78]  Laurie J. Hendren,et al.  Locality analysis for parallel C programs , 1997, Proceedings 1997 International Conference on Parallel Architectures and Compilation Techniques.

[79]  Amer Diwan,et al.  Type-based alias analysis , 1998, PLDI.

[80]  Martin C. Rinard,et al.  Automatic parallelization of divide and conquer algorithms , 1999, PPoPP '99.

[81]  Jyh-Herng Chow,et al.  Compile-time analysis of parallel programs that share memory , 1992, POPL '92.

[82]  Laurie J. Hendren,et al.  Communication optimizations for parallel C programs , 1998, J. Parallel Distributed Comput..

[83]  Bernhard Steffen,et al.  Code motion for explicitly parallel programs , 1999, PPoPP '99.

[84]  Mark N. Wegman,et al.  Analysis of pointers and structures , 1990, SIGP.

[85]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[86]  Dirk Grunwald,et al.  Data flow equations for explicitly parallel programs , 1993, PPOPP '93.

[87]  James Hook,et al.  Static single assignment for explicitly parallel programs , 1993, POPL '93.

[88]  James Hicks,et al.  Experiences with compiler-directed storage reclamation , 1993, FPCA '93.

[89]  Guy L. Steele,et al.  Making asynchronous parallelism safe for the world , 1989, POPL '90.

[90]  John M. Mellor-Crummey,et al.  On-the-fly detection of data races for programs with nested fork-join parallelism , 1991, Proceedings of the 1991 ACM/IEEE Conference on Supercomputing (Supercomputing '91).

[91]  David A. Padua,et al.  Basic compiler algorithms for parallel programs , 1999, PPoPP '99.

[92]  Laurie J. Hendren,et al.  Communication Optimizations for Parallel C Programs , 1999, J. Parallel Distributed Comput..

[93]  Barbara Liskov,et al.  Reducing cross domain call overhead using batched futures , 1994, OOPSLA '94.

[94]  Bjarne Steensgaard,et al.  Points-to analysis in almost linear time , 1996, POPL '96.

[95]  Bruno Blanchet,et al.  Escape analysis for object-oriented languages: application to Java , 1999, OOPSLA '99.

[96]  Martin C. Rinard,et al.  Pointer and escape analysis for multithreaded programs , 2001, PPoPP '01.