Advertisement

Flow-insensitive interprocedural alias analysis in the presence of pointers

  • Michael Burke
  • Paul Carini
  • Jong-Deok Choi
  • Michael Hind
Back to Basics: Program Analysis
Part of the Lecture Notes in Computer Science book series (LNCS, volume 892)

Abstract

Data-flow analysis algorithms can be classified into two categories: flow-sensitive and flow-insensitive. To improve efficiency, flow insensitive interprocedural analyses do not make use of the intraprocedural control flow information associated with individual procedures. Since pointer-induced aliases can change within a procedure, applying known flow-insensitive analyses can result in either incorrect or overly conservative solutions. In this paper, we present a flow-insensitive data flow analysis algorithm that computes interprocedural pointer-induced aliases. We improve the precision of our analysis by (1) making use of certain types of kill information that can be precomputed efficiently, and (2) computing aliases generated in each procedure instead of holding at the exit of each procedure. We improve the efficiency of our algorithm by introducing a technique called deferred evaluation.

Interprocedural analyses, including alias analysis, rely upon the program call graph (PCG) for their correctness and precision. The PCG becomes incomplete or overly imprecise in the presence of function pointers. This paper also describes a method for constructing the PCG in the presence of function pointers.

Keywords

Function Pointer Program Language Access Path Call Site Program Language Design 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    A. V. Aho, M. R. Garey, and J. D. Ullman. The transitive reduction of a directed graph. SIAM Journal on Computing, 1(2):131–137, 1972.Google Scholar
  2. 2.
    Frances Allen, Michael Burke, Philippe Charles, Ron Cytron, and Jeanne Ferrante. An overview of the ptran analysis system for multiprocessing. Proceedings of the ACM 1987 International Conference on Supercomputing, 1987. Also published in The Journal of Parallel and Distributed Computing, Oct., 1988, 5(5) pages 617–640.Google Scholar
  3. 3.
    Randy Allen, David Callahan, and Ken Kennedy. Automatic decomposition of scientific programs for parallel execution. Conference Record of the Fourteenth Annual ACM Symposium on Principles of Programming Languages, pages 63–76, January 1987.Google Scholar
  4. 4.
    John Banning. An efficient way to find the side effects of procedure calls and the aliases of variables. 6th Annual ACM Symposium on the Principles of Programming Languages, pages 29–41, January 1979.Google Scholar
  5. 5.
    Michael Burke. An interval-based approach to exhaustive and incremental interprocedural data flow analysis. Technical report, IBM Research, August 1987. Report RC12702.Google Scholar
  6. 6.
    Michael Burke. An interval-based approach to exhaustive and incremental inter procedural data-flow analysis. ACM Transactions on Programming Languages and Systems, 12(3):341–395, July 1990.Google Scholar
  7. 7.
    Michael Burke, Paul Carini, Jong-Deok Choi, and Michael Hind. Efficient flow insensitive alias analysis in the presence of pointers. Technical report RC 19546, IBM T. J. Watson Research Center, September 1994.Google Scholar
  8. 8.
    D. Callahan, A. Carle, M. W. Hall, and K. Kennedy. Constructing the procedure call multigraph. IEEE Transactions on Software Engineering, 16(4):483–487, April 1990.Google Scholar
  9. 9.
    Jong-Deok Choi, Michael Burke, and Paul Carini. Efficient flow-sensitive inter procedural computation of pointer-induced aliases and side effects. Conference Record of the Twentieth Annual ACM Symposium on Principles of Programming Languages, January 1993.Google Scholar
  10. 10.
    Jong-Deok Choi and Jeanne Ferrante. Static slicing in the presence of GOTO statements. ACM Transactions on Programming Languages and Systems, 1994. To appear.Google Scholar
  11. 11.
    Alain Deutsch. On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications. In 17th Annual ACM Symposium on the Principles of Programming Languages, pages 157–168, San Francisco, January 1990. ACM Press.Google Scholar
  12. 12.
    Alain Deutsch. Interprocedural may-alias analysis for pointers: Beyond k-limiting. In SIGPLAN '94 Conference on Programming Language Design and Implementation, 1994.Google Scholar
  13. 13.
    Maryam Emami, Rakesh Ghiya, and Laurie J. Hendren. Context-sensitive inter procedural points-to analysis in the presence of function pointers. In SIGPLAN '94 Conference on Programming Language Design and Implementation, 1994.Google Scholar
  14. 14.
    Dennis Gannon, Vincent A. Guarna, Jr., and Jenq Kuen Lee. Static analysis and runtime support for parallel execution of C. Proceedings of the Second Workshop on Languages and Compilers for Parallel Computing, August 1989.Google Scholar
  15. 15.
    Susan L. Graham and Mark Wegman. A fast and usually linear algorithm for global flow analysis. Journal of the Association for Computing Machinery, 23(1):172–202, January 1976.Google Scholar
  16. 16.
    Mary W. Hall and Ken Kennedy. Efficient call graph analysis. ACM Letters on Programming Languages and Systems, 1(3):227–242, September 1992.Google Scholar
  17. 17.
    Mary Hean Harrold and Mary Lou Soffa. Efficient computation of interprocedural definition — use chains. ACM Transactions on Programming Languages and Systems, 16(2):175–204, March 1994.Google Scholar
  18. 18.
    Susan Horwitz, Thomas Reps, and David Binkley. Interprocedural slicing using dependence graphs. ACM Transactions on Programming Languages and Systems, 12(1):26–60, January 1990.Google Scholar
  19. 19.
    W. L. Harrison III. The interprocedural analysis and automatic parallelisation of Scheme programs. Lisp and Symbolic Computation, 2(3):176–396, Octobet 1989.Google Scholar
  20. 20.
    John B. Kam and Jeffrey D. Ullman. Global data flow analysis and iterative algorithms. JACM, 23, 1:158–171, January 1976.Google Scholar
  21. 21.
    K. Kennedy, K. S. McKinley, and C. Tseng. Interactive parallel programming using the parascope editor. IEEE Transactions on Parallel and Distributed Systems, 2(3):329–341, July 1991.Google Scholar
  22. 22.
    Arun Lakhotia. Constructing call multigraphs using dependence graphs. In 20th Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 273–284. ACM, January 1993.Google Scholar
  23. 23.
    William Landi and Barbara G. Ryder. A safe approximate algorithm for interprocedural pointer aliasing. Proceedings of the ACM SIGPLAN '92 Conference on Programming Language Design and Implementation, pages 235–248, June 1992.Google Scholar
  24. 24.
    J. R. Larus and P. N. Hilfinger. Detecting conflicts between structure accesses. Proceedings of the ACM SIGPLAN '88 Conference on Programming Language Design and Implementation, 23(7):21–34, July 1988.Google Scholar
  25. 25.
    James Richard Larus. Restructuring Symbolic Programs for Concurrent Execution on Multiprocessors. PhD thesis, University of California, 1989. Technical Report No. UCB/CSD 89/502.Google Scholar
  26. 26.
    T. J. Marlowe and B. Ryder. An efficient hybrid algorithm for incremental data flow analysis. 17th Annual ACM Symposium on the Principles of Programming Languages, pages 184–196, January 1990.Google Scholar
  27. 27.
    Thomas Marlowe, William Landi, Barbara Ryder, Jong-Deok Choi, Michael Burke, and Paul Carini. Pointer-induced aliasing: A clarification. SIGPLAN Notices, 28(9):67–70, September 1993.Google Scholar
  28. 28.
    T.J. Marlowe, B.G. Ryder, and M.G. Burke. Defining flow-sensitivity in data flow problems. In Preparation, 1994.Google Scholar
  29. 29.
    Torben Æ Mogensen. Binding time analysis for polymorphically typed higher-order languages. In Proceedings TAPSOFT, volume 352 of Lecture Notes in Computer Science, pages 298–312. Springer Verlag, 1989.Google Scholar
  30. 30.
    A. Neirynck, P. Panangaden, and A. J. Demers. Effect analysis in higher-order languages. International Journal of Parallel Programming, 18(1):1–17, 1989.Google Scholar
  31. 31.
    Barbara Ryder. Constructing the call graph of a program. IEEE Software Engineering, May 1979.Google Scholar
  32. 32.
    Peter Sestoft. Replacing function parameters by global variables. In Conference on Functional Programming Languages and Computer Architecture, pages 39–53, London, September 1989. ACM Press.Google Scholar
  33. 33.
    Olin Shivers. Control flow analysis in Scheme. In SIGPLAN '88 Conference on Programming Language Design and Implementation, pages 164–174, June 1988.Google Scholar
  34. 34.
    William Weihl. Interprocedural data flow analysis in the presence of pointer, procedure variables and label variables. Conf. Rec. Seventh ACM Symposium on Principles of Programming Languages, 1980.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • Michael Burke
    • 1
  • Paul Carini
    • 1
  • Jong-Deok Choi
    • 1
  • Michael Hind
    • 2
  1. 1.IBM T. J. Watson Research CenterUSA
  2. 2.IBM T. J. Watson Research CenterState University of New York at New PaltzUSA

Personalised recommendations