skip to main content
research-article

Fast condensation of the program dependence graph

Published:16 June 2013Publication History
Skip Abstract Section

Abstract

Aggressive compiler optimizations are formulated around the Program Dependence Graph (PDG). Many techniques, including loop fission and parallelization are concerned primarily with dependence cycles in the PDG. The Directed Acyclic Graph of Strongly Connected Components (DAGSCC) represents these cycles directly. The naive method to construct the DAGSCC first computes the full PDG. This approach limits adoption of aggressive optimizations because the number of analysis queries grows quadratically with program size, making DAGSCC construction expensive. Consequently, compilers optimize small scopes with weaker but faster analyses.

We observe that many PDG edges do not affect the DAGSCC and that ignoring them cannot affect clients of the DAGSCC. Exploiting this insight, we present an algorithm to omit those analysis queries to compute the DAGSCC efficiently. Across 366 hot loops from 20 SPEC2006 benchmarks, this method computes the DAGSCC in half of the time using half as many queries.

References

  1. R. Allen and S. Johnson. Compiling C for vectorization, parallelization, and inline expansion. In Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation (PLDI), pages 241--249, June 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. U. Banerjee. Loop Transformations for Restructuring Compilers: The Foundations. Kluwer Academic Publishers, Norwell, MA, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. Chen, J. Lin, W. Hsu, and P. Yew. An empirical study on the granularity of pointer analysis in C programs. Languages and Compilers for Parallel Computing (LCPC), pages 157--171, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. R. Cytron. DOACROSS: Beyond vectorization for multiprocessors. In Proceedings of the 1986 International Conference on Parallel Processing (ICPP), pages 836--884, 1986.Google ScholarGoogle Scholar
  5. E. Duesterwald, R. Gupta, and M. L. Soffa. Reducing the cost of data flow analysis by congruence partitioning. In In International Conference on Compiler Construction, pages 357--373. Springer-Verlag, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Ferrante, K. J. Ottenstein, and J. D. Warren. The program dependence graph and its use in optimization. ACM Transactions on Programming Languages and Systems, 9:319--349, July 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. S. Foster, M. Fähndrich, and A. Aiken. Polymorphic versus monomorphic flow-insensitive points-to analysis for C. In Proceedings of the 7th International Symposium on Static Analysis (SAS), pages 175--198, London, UK, UK, 2000. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. Ghiya, D. Lavery, and D. Sehr. On the importance of points-to analysis and other memory disambiguation methods for C programs. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation (PLDI), pages 47--58. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. B. Guo, M. J. Bridges, S. Triantafyllis, G. Ottoni, E. Raman, and D. I. August. Practical and accurate low-level pointer analysis. In Proceedings of the 3rd International Symposium on Code Generation and Optimization (CGO), March 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. Z. Guyer and C. Lin. Client-driven pointer analysis. In In International Static Analysis Symposium, pages 214--236. Springer-Verlag, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. R. E. Hank,W.W. Hwu, and B. R. Rau. Region-based compilation: An introduction and motivation. In Proceedings of the 28th Annual International Symposium on Microarchitecture, pages 158--168, December 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. J. Harrold, B. Malloy, and G. Rothermel. Efficient construction of Program Dependence Graphs. In Proceedings of the 1993 ACM SIGSOFT international symposium on Software testing and analysis (ISSTA), pages 160--170, New York, NY, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. N. Heintze and O. Tardieu. Demand-driven pointer analysis. In Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation (PLDI), pages 24--34, New York, NY, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Hind. Pointer analysis: Haven't we solved this problem yet? In 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE), 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Hind and A. Pioli. Evaluating the effectiveness of pointer alias analyses. In Science of Computer Programming, pages 31--55, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. Horwitz. Precise flow-insensitive may-alias analysis is NP-hard. ACM Transactions on Programming Languages and Systems, 19(1), January 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Horwitz and T. Reps. The use of program dependence graphs in software engineering. In In proceedings of the Fourtheenth International Conference on Software Engineering (CSE), pages 392--411, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. Johnson and K. Pingali. Dependence-based program analysis. In Proceedings of the SIGPLAN '93 Conference on Programming Language Design and Implementation (PLDI), pages 78--89, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. G. Kendall. Rank Correlation Methods. Charles Griffin and Company, Limited, London, 1948.Google ScholarGoogle Scholar
  20. K. Kennedy and J. R. Allen. Optimizing compilers for modern architectures: a dependence-based approach. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In Proceedings of the Annual International Symposium on Code Generation and Optimization (CGO), pages 75--86, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. C. Lattner, A. Lenharth, and V. Adve. Making Context-Sensitive Points-to Analysis with Heap Cloning Practical For The Real World. In Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), San Diego, California, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. P. Liang and M. Naik. Scaling abstraction refinement via pruning. In Proceedings of the 2011 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. W. Liu, J. Tuck, L. Ceze, W. Ahn, K. Strauss, J. Renau, and J. Torrellas. POSH: a TLS compiler that exploits program structure. In PPoPP '06: Proceedings of the 11th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 158--167, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. Muth and S. Debray. Partial inlining. Technical report, Department of Computer Science, University of Arizona, 1997.Google ScholarGoogle Scholar
  26. R. Muth and S. Debray. On the complexity of flow-sensitive dataflow analyses. In In Proc. ACM Symp. on Principles of Programming Languages, pages 67--80. ACM Press, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. F. Ohata, A. Nishimatsu, and K. Inoue. Analyzing dependence locality for efficient construction of program dependence graph. Information and Software Technology, 42(13):935--946, 2000.Google ScholarGoogle ScholarCross RefCross Ref
  28. E. Raman, G. Ottoni, A. Raman, M. Bridges, and D. I. August. Parallel-stage decoupled software pipelining. In Proceedings of the Annual International Symposium on Code Generation and Optimization (CGO), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. R. Rangan, N. Vachharajani, M. Vachharajani, and D. I. August. Decoupled software pipelining with the synchronization array. In Proceedings of the 13th International Conference on Parallel Architectures and Compilation Techniques (PACT), pages 177--188, September 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. L. Rauchwerger and D. A. Padua. The LRPD test: Speculative runtime parallelization of loops with privatization and reduction parallelization. IEEE Transactions on Parallel Distributed Systems, 10:160--180, February 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Standard Performance Evaluation Corporation. http://www.spec.org.Google ScholarGoogle Scholar
  32. M. Sridharan, D. Gopan, L. Shan, and R. Bodík. Demand-driven points-to analysis for java. In Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA), pages 59--76, New York, NY, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. R. E. Tarjan. Depth-first search and linear graph algorithms. SIAM Journal on Computing, 1(2):146--160, 1972.Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. A. J. Thadhani. Factors affecting programmer productivity during application development. IBM Systems Journal, 23(1):19--35, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. C. Tian, M. Feng, V. Nagarajan, and R. Gupta. Copy or discard execution model for speculative parallelization on multicores. In Proceedings of the 41st Annual IEEE/ACM International Symposium on Microarchitecture (MICRO), pages 330--341, Washington, DC, 2008. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. H. Vandierendonck, S. Rul, and K. De Bosschere. The Paralax infrastructure: Automatic parallelization with a helping hand. In Proceedings of the 19th International Conference on Parallel Architecture and Compilation Techniques (PACT), pages 389--400, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. Weiser. Program slicing. In Proceedings of the 5th international conference on Software engineering, (ICSE), pages 439--449, Piscataway, NJ, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation, (PLDI), pages 131--144, New York, NY, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. The Wisconsin Program-Slicing Tool, Version 1.1, 2000. http://research.cs.wisc.edu/wpis/slicing tool/.Google ScholarGoogle Scholar
  40. X. Zheng and R. Rugina. Demand-driven alias analysis for C. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 197--208, New York, NY, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Fast condensation of the program dependence graph

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!