skip to main content
research-article
Public Access

Tree dependence analysis

Published:03 June 2015Publication History
Skip Abstract Section

Abstract

We develop a new framework for analyzing recursive methods that perform traversals over trees, called tree dependence analysis. This analysis translates dependence analysis techniques for regular programs to the irregular space, identifying the structure of dependences within a recursive method that traverses trees. We develop a dependence test that exploits the dependence structure of such programs, and can prove that several locality- and parallelism- enhancing transformations are legal. In addition, we extend our analysis with a novel path-dependent, conditional analysis to refine the dependence test and prove the legality of transformations for a wider range of algorithms. We then use these analyses to show that several common algorithms that manipulate trees recursively are amenable to several locality- and parallelism-enhancing transformations. This work shows that classical dependence analysis techniques, which have largely been confined to nested loops over array data structures, can be extended and translated to work for complex, recursive programs that operate over pointer-based data structures.

References

  1. J. R. Allen and K. Kennedy. Automatic Loop Interchange. In Proceedings of the 1984 SIGPLAN Symposium on Compiler Construction, pages 233–246, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. R. Allen and K. Kennedy. Optimizing Compilers for Modern Architectures: A Dependence-Based Approach. Morgan Kaufmann, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. K. Andrusky, S. Curial, and J. N. Amaral. Tree-traversal orientation analysis. In Proceedings of the 19th International Conference on Languages and Compilers for Parallel Computing, pages 220–234, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. U. Banerjee. Unimodular Transformations of Double Loops. In Languages and Compilers for Parallel Computing, 1991.Google ScholarGoogle Scholar
  5. U. Bondhugula, A. Hartono, J. Ramanujam, and P. Sadayappan. A Practical Automatic Polyhedral Parallelizer and Locality Optimizer. In Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 101–113, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. Cousot and R. Cousot. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In Proceedings of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pages 238– 252, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. De Moura and N. Bjørner. Z3: An E fficient SMT Solver. In Proceedings of the Theory and Practice of Software, 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, TACAS’08 /ETAPS’08, pages 337–340, Berlin, Heidelberg, 2008. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Deutsch. Interprocedural May-Alias Analysis for Pointers: Beyond k-limiting. In PLDI ’94: Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, pages 230–241, New York, NY, USA, 1994. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. Ekman and G. Hedin. The JastAdd Extensible Java Compiler. In Proceedings of the 22nd annual ACM SIGPLAN conference on Objectoriented programming systems and applications, OOPSLA ’07, pages 1–18, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. Feautrier. Some E fficient Solutions to the Affine Scheduling Problem: I. One-dimensional Time. Int. J. Parallel Program., 21:313–348, October 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. Frigo, C. E. Leiserson, and K. H. Randall. The Implementation of the Cilk-5 Multithreaded Language. In Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation, PLDI ’98, pages 212–223, New York, NY, USA, 1998. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. R. Ghiya and L. J. Hendren. Is It a Tree, a DAG, or a Cyclic Graph? A Shape Analysis for Heap-directed Pointers in C. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’96, pages 1–15, New York, NY, USA, 1996. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. Ghiya, L. Hendren, and Y. Zhu. Detecting Parallelism in C Programs with Recursive Data Structures. IEEE Transactions on Parallel and Distributed Systems, 1:35–47, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. Hummel, L. J. Hendren, and A. Nicolau. A General Data Dependence Test for Dynamic, Pointer-based Data Structures. In Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, PLDI ’94, pages 218–229, New York, NY, USA, 1994. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Y. Jo and M. Kulkarni. Enhancing Locality for Recursive Traversals of Recursive Structures. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications, pages 463–482, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Y. Jo and M. Kulkarni. Automatically Enhancing Locality for Tree Traversals with Traversal Splicing. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications, pages 355–374, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. D. Lam, E. E. Rothberg, and M. E. Wolf. The Cache Performance and Optimizations of Blocked Algorithms. In Proceedings of the Fourth International Conference on Architectural Support for Programming Languages and Operating Systems, pages 63–74, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. R. Larus and P. N. Hilfinger. Detecting Conflicts Between Structure Accesses. In Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation, PLDI ’88, pages 24–31, New York, NY, USA, 1988. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. P. Madhusudan, X. Qiu, and A. Stefanescu. Recursive Proofs for Inductive Tree Data-structures. In Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’12, pages 123–136, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. W. Pugh. The Omega Test: A Fast and Practical Integer Programming Algorithm for Dependence Analysis. In Proceedings of the 1991 ACM /IEEE conference on Supercomputing, Supercomputing ’91, pages 4–13, New York, NY, USA, 1991. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. W. Pugh and D. Wonnacott. Non-Linear Array Dependence Analysis. Languages, Compilers, and Run-Time Systems for Scalable Computers, pages 1–14, 1996.Google ScholarGoogle Scholar
  22. M. C. Rinard and P. C. Diniz. Commutativity Analysis: A New Analysis Technique for Parallelizing Compilers. ACM Trans. Program. Lang. Syst., 19(6):942–991, Nov. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. Rugina and M. C. Rinard. Symbolic Bounds Analysis of Pointers, Array Indices, and Accessed Memory Regions. ACM Trans. Program. Lang. Syst., 27(2):185–235, Mar. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Sagiv, T. Reps, and R. Wilhelm. Parametric Shape Analysis via 3valued Logic. ACM Trans. Program. Lang. Syst., 24(3):217–298, May 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. D. D. Sleator and R. E. Tarjan. Self Adjusting Heaps. SIAM J. Comput., 15(1):52–69, Feb. 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. M. Strout, L. Carter, and J. Ferrante. Compile-time Composition of Run-time Data and Iteration Reorderings. In Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation, PLDI ’03, pages 91–102, New York, NY, USA, 2003. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. M. Strout, F. Luporini, C. D. Krieger, C. Bertolli, G.-T. Bercea, C. Olschanowsky, J. Ramanujam, and P. H. J. Kelly. Generalizing run-time tiling with the loop chain abstraction. In Proceedings of the 2014 IEEE 28th International Parallel and Distributed Processing Symposium, IPDPS ’14, pages 1136–1145, Washington, DC, USA, 2014. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. A. van Engelen, J. Birch, Y. Shou, B. Walsh, and K. A. Gallivan. A Unified Framework for Nonlinear Dependence Testing and Symbolic Analysis. In Proceedings of the 18th Annual International Conference on Supercomputing, ICS ’04, pages 106–115, New York, NY, USA, 2004. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. A. Venkat, M. Shantharam, M. Hall, and M. M. Strout. Non-a ffine Extensions to Polyhedral Code Generation. In Proceedings of Annual IEEE /ACM International Symposium on Code Generation and Optimization, CGO ’14, pages 185:185–185:194, New York, NY, USA, 2014. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. B. Wiedermann and W. R. Cook. Extracting Queries by Static Analysis of Transparent Persistence. In Proceedings of the 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’07, pages 199–210, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. E. Wolf and M. S. Lam. A Data Locality Optimizing Algorithm. In Proceedings of the ACM SIGPLAN 1991 conference on Programming language design and implementation, PLDI ’91, pages 30–44, New York, NY, USA, 1991. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. M. Wolfe. More Iteration Space Tiling. In Proceedings of the 1989 ACM /IEEE Conference on Supercomputing, pages 655–664, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. G. Zumbusch. Data Dependence Analysis for the Parallelization of Numerical Tree Codes. In B. Kågström, E. Elmroth, J. Dongarra, and J. Waśniewski, editors, Applied Parallel Computing. State of the Art in Scientific Computing, volume 4699 of Lecture Notes in Computer Science, pages 890–899. Springer Berlin Heidelberg, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Tree dependence analysis

      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

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 50, Issue 6
        PLDI '15
        June 2015
        630 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2813885
        • Editor:
        • Andy Gill
        Issue’s Table of Contents
        • cover image ACM Conferences
          PLDI '15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation
          June 2015
          630 pages
          ISBN:9781450334686
          DOI:10.1145/2737924

        Copyright © 2015 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 3 June 2015

        Check for updates

        Qualifiers

        • research-article

      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!