Advertisement

Polynomial Time Array Dataflow Analysis

  • Robert Seater
  • David Wonnacott
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2624)

Abstract

Array dataflow analysis is a valuable tool for supercomuter compilers. However, the worst-case asymptotic time complexities for modern array dataflow analysis techniques are either not well understood or alarmingly high. For example, the Omega Test uses a subset of the \( 2^{2^{2^{O(n)} } } \) language of Presburger Arithmetic for analysis of affine dependences; its use of uninterpreted function symbols for non-affine terms introduces additional sources of complexity. Even traditional data dependence analysis of affine dependences is equivalent to integer programming, and is thus NP-complete. These worst-case complexities have raised questions about the wisdom of using array dataflow analysis in a production compiler, despite empirical data that show that various tests run quickly in practice.

In this paper, we demonstrate that a polynomial-time algorithm can produce accurate information about the presence of loop-carried array dataflow. We first identify a subdomain of Presburger Arithmetic that can be manipulated (by the Omega Library) in polynomial time; we then describe a modification to prevent exponential blowup of the Omega Library’s algorithm for manipulating function symbols.

Restricting the Omega Test to these polynomial cases can, in principle, reduce the accuracy of the dataflow information produced. We therefore present the results of our investigation of the effects of these restrictions on the detection of loop-carried array dataflow dependences (which prevent parallelization). These restrictions block parallelization of only a few unimportant loop nests in the approximately 18000 lines of benchmark code we studied. The use of our subdomain of Presburger Arithmetic also gives a modest reduction in analysis time, even with our current unoptimized implementation, as long as we do not employ our modified algorithms for function symbols. The data collected in our empirical studies also suggest directions for improving both accuracy and efficiency.

Keywords

Polynomial Time Function Symbol Dependence Analysis Loop Index Symbolic Constant 
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]
    R. Eigenmann, J. Hoeflinger, Z. Li, and D. Padua. Experience in the automatic parallelization of 4 Perfect benchmark programs. In Proceedings of the 4th Workshop on Programming Languages and Compilers for Parallel Computing, August 1991. Also Technical Report 1193, CSRD, Univ. of Illinois.Google Scholar
  2. [2]
    Paul Feautrier. Toward automatic distribution. Parallel Processing Letters, 4(3):233–244, September 1994.CrossRefGoogle Scholar
  3. [3]
    David Wonnacott. Using Time Skewing to eliminate idle time due to memory bandwidth and network limitations. In Proceedings of the 2000 International Parallel and Distributed Processing Symposium, May 2000. An earlier version is available as Rutgers University DCS TR 388.Google Scholar
  4. [4]
    William Pugh. The Omega test: a fast and practical integer programming algorithm for dependence analysis. Communications of the ACM, 35(8):102–114, August 1992.CrossRefGoogle Scholar
  5. [5]
    William Pugh and David Wonnacott. An exact method for analysis of value-based array data dependences. In Proceedings of the 6th International Workshop on Languages and Compilers for Parallel Computing, volume 768 of Lecture Notes in Computer Science. Springer-Verlag, Berlin, August 1993. Also available as Tech. Report CS-TR-3196, Dept. of Computer Science, University of Maryland, College Park.Google Scholar
  6. [6]
    William Pugh and David Wonnacott. Constraint-based array dependence analysis. ACM Trans. on Programming Languages and Systems, 20(3):635–678, May 1998.CrossRefGoogle Scholar
  7. [7]
    D. E. Maydan, J. L. Hennessy, and M. S. Lam. Efficient and exact data dependence analysis. In ACM SIGPLAN’ 91 Conference on Programming Language Design and Implementation, pages 1–14, June 1991.Google Scholar
  8. [8]
    G. Kreisel and J. L. Krevine. Elements of Mathematical Logic. North-Holland Pub. Co., 1967.Google Scholar
  9. [9]
    Michael J. Fischer and Michael O. Rabin. Super-exponential complexity of Presburger arithmetic. In Richard M. Karp, editor, Proceedings of the SIAM-AMS Symposium in Applied Mathematics, volume 7, pages 27–41, Providence, RI, 1974. AMS.Google Scholar
  10. [10]
    D. Oppen. A \( 2^{2^{2^{pn} } } \) upper bound on the complexity of presburger arithmetic. Journal of Computer and System Sciences, 16(3):323–332, July 1978.zbMATHCrossRefMathSciNetGoogle Scholar
  11. [11]
    Dror Eliezer Maydan. Accurate Analysis of Array References. PhD thesis, Computer Systems Laboratory, Stanford U., September 1992.Google Scholar
  12. [12]
    Robert Seater and David Wonnacott. Polynomial time array dataflow analysis. Technical Report 2000-38, Center for Discrete Mathematics and Theoretical Computer Science, November 2000.Google Scholar
  13. [13]
    M. Berry et al. The PERFECT Club benchmarks: Effective performance evaluation of supercomputers. International Journal of Supercomputing Applications, 3(3):5–40, March 1989.CrossRefGoogle Scholar
  14. [14]
    Michael R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman and Company, 1979.Google Scholar
  15. [15]
    William Pugh and David Wonnacott. Eliminating false data dependences using the Omega test. In SIGPLAN Conference on Programming Language Design and Implementation, pages 140–151, San Francisco, California, June 1992.Google Scholar
  16. [16]
    David G. Wonnacott. Constraint-Based Array Dependence Analysis. PhD thesis, Dept. of Computer Science, The University of Maryland, August 1995. Available as ftp://ftp.cs.umd.edu/pub/omega/davewThesis/davewThesis.ps.
  17. [17]
    Robert E. Shostak. A practical decision procedure for arithmetic with function symbols. Journal of the ACM, 26(2):351–360, April 1979.zbMATHCrossRefMathSciNetGoogle Scholar
  18. [18]
    William Pugh and David Wonnacott. Nonlinear array dependence analysis. In Third Workshop on Languages, Compilers, and Run-Time Systems for Scalable Computers, Troy, New York, May 1995.Google Scholar
  19. [19]
    P. Downey. Undecidability of presburger arithmetic with a single monadic predicate letter. Technical Report 18-72, Center for Research in Computing Technology, Havard Univ., 1972.Google Scholar
  20. [20]
    Louis Comtet. Advanced Combinatorics. D. Reidel Publishing Company, Dordrecht, Holland, 1974.zbMATHGoogle Scholar
  21. [21]
    M. J. Wolfe. Optimizing Supercompilers for Supercomputers. The MIT Press, Cambridge, Mass., 1989.zbMATHGoogle Scholar
  22. [22]
    Thomas Brandes. The importance of direct dependences for automatic parallelism. In Proceedings of the 2nd International Conference on Supercomputing, pages 407–417, July 1988.Google Scholar
  23. [23]
    Hudson Ribas. Obtaining dependence vectors for nested-loop computations. In Proceedings of 1990 International Conference on Parallel Processing, pages II-212–II-219, August 1990.Google Scholar
  24. [24]
    Carl Rosene. Incremental Dependence Analysis. PhD thesis, Dept. of Computer Science, Rice University, March 1990.Google Scholar
  25. [25]
    Thomas Gross and Peter Steenkiste. Structured dataflow analysis for arrays and its use in an optimizing compiler. Software—Practice and Experience, 20:133–155, February 1990.Google Scholar
  26. [26]
    Paul Feautrier. Dataflow analysis of scalar and array references. International Journal of Parallel Programming, 20(1):23–53, February 1991.zbMATHCrossRefGoogle Scholar
  27. [27]
    M. W. Hall, B. R. Murphy, S. P. Amarasinghe, S. Liao, and M. S. Lam. Interprocedural analysis for parallelization. In Proceedings of the 8th International Workshop on Languages and Compilers for Parallel Computing, August 1995.Google Scholar
  28. [28]
    Saman P. Amarasinghe. Parallelizing Compiler Techniques Based on Linear Inequalities. PhD thesis, Computer Systems Laboratory, Stanford U., January 1997.Google Scholar
  29. [29]
    Sungdo Moon, Mary W. Hall, and Brian R. Murphy. Predicated array data-flow analysis for run-time parallelization. In Proceedings of the 1998 International Conference on Supercomputing, July 1998.Google Scholar
  30. [30]
    Sungdo Moon and Mary W. Hall. Evaluation of predicated array data-flow analysis for automatic parallelization. In Proceedings of the 7th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 84–95, May 1999.Google Scholar
  31. [31]
    Zhiyuan Li. Array privatization for parallel execution of loops. In Proceedings of the 1992 International Conference on Supercomputing, pages 313–322, July 1992.Google Scholar
  32. [32]
    Junjie Gu, Zhiyuan Li, and Gyungho Lee. Symbolic array dataflow analysis for array privatization and program parallelization. In Supercomputing’ 95, San Diego, Ca, December 1995.Google Scholar
  33. [33]
    Junjie Gu, Zhiyuan Li, and Gyungho Lee. Experience with efficient array data flow analysis for array privatization. In Proceedings of the 6th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 157–167, Las Vegas, Nevada, June 1997.Google Scholar
  34. [34]
    Peng Tu and David Padua. Array privatization for shared and distributed memory machines. In Workshop on Languages, Compilers, and Run-Time Environments for Distributed Memory Multiprocessors, September 1992.Google Scholar
  35. [35]
    Peng Tu. Automatic Array Privatization and Demand-Driven Symbolic Analysis. PhD thesis, Dept. of Computer Science, University of Illinois at Urbana-Champaign, 1995.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Robert Seater
    • 1
  • David Wonnacott
    • 1
  1. 1.Haverford CollegeHaverford

Personalised recommendations