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.
- J. R. Allen and K. Kennedy. Automatic Loop Interchange. In Proceedings of the 1984 SIGPLAN Symposium on Compiler Construction, pages 233–246, 1984. Google Scholar
Digital Library
- R. Allen and K. Kennedy. Optimizing Compilers for Modern Architectures: A Dependence-Based Approach. Morgan Kaufmann, 2001. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- U. Banerjee. Unimodular Transformations of Double Loops. In Languages and Compilers for Parallel Computing, 1991.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- W. Pugh and D. Wonnacott. Non-Linear Array Dependence Analysis. Languages, Compilers, and Run-Time Systems for Scalable Computers, pages 1–14, 1996.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- D. D. Sleator and R. E. Tarjan. Self Adjusting Heaps. SIAM J. Comput., 15(1):52–69, Feb. 1986. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- M. Wolfe. More Iteration Space Tiling. In Proceedings of the 1989 ACM /IEEE Conference on Supercomputing, pages 655–664, 1989. Google Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Tree dependence analysis
Recommendations
Tree dependence analysis
PLDI '15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and ImplementationWe 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 ...
Fast condensation of the program dependence graph
PLDI '13: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and ImplementationAggressive 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 ...
Fast condensation of the program dependence graph
PLDI '13Aggressive 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 ...






Comments