Abstract
Points-to analysis is a key compiler analysis. Several memory related optimizations use points-to information to improve their effectiveness. Points-to analysis is performed by building a constraint graph of pointer variables and dynamically updating it to propagate more and more points-to information across its subset edges. So far, the structure of the constraint graph has been only trivially exploited for efficient propagation of information, e.g., in identifying cyclic components or to propagate information in topological order. We perform a careful study of its structure and propose a new inclusion-based flow-insensitive context-sensitive points-to analysis algorithm based on the notion of dominant pointers. We also propose a new kind of pointer-equivalence based on dominant pointers which provides significantly more opportunities for reducing the number of pointers tracked during the analysis. Based on this hitherto unexplored form of pointer-equivalence, we develop a new context-sensitive flow insensitive points-to analysis algorithm which uses incremental dominator update to efficiently compute points-to information. Using a large suite of programs consisting of SPEC 2000 benchmarks and five large open source programs we show that our points-to analysis is 88% faster than BDD-based Lazy Cycle Detection and 2× faster than Deep Propagation. We argue that our approach of detecting dominator-based pointer-equivalence is a key to improve points-to analysis efficiency.
- H. Agrawal and J. R. Horgan. Dynamic program slicing. In PLDI, pages 246--256, 1990. Google ScholarDigital Library
- L. O. Andersen. Program analysis and specialization for the C programming language, PhD Thesis, DIKU, University of Copenhagen, 1994.Google Scholar
- M. Berndl, O. Lhoták, F. Qian, L. Hendren, and N. Umanee. Points-to analysis using bdds. In PLDI, PLDI '03, pages 103--114, New York, NY, USA, 2003. ACM. Google ScholarDigital Library
- M. Burke and L. Torczon. Interprocedural optimization eliminating unnecessary recompilation. ACM Trans. Program. Lang. Syst., 15: 367--399, July 1993. ISSN 0164-0925. Google ScholarDigital Library
- R. Cytron, J. Ferrante, B. K. Rosen,M. N.Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Trans. Program. Lang. Syst., 13:451--490, October 1991. ISSN 0164-0925. Google ScholarDigital Library
- M. Das. Unification-based pointer analysis with directional assignments. In PLDI, PLDI '00, pages 35--46, New York, NY, USA, 2000. ACM. Google ScholarDigital Library
- M. Emami, R. Ghiya, and L. J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In PLDI, PLDI '94, pages 242--256, New York, NY, USA, 1994. ACM. Google ScholarDigital Library
- M. Fähndrich, J. S. Foster, Z. Su, and A. Aiken. Partial online cycle elimination in inclusion constraint graphs. In PLDI, PLDI '98, pages 85--96, New York, NY, USA, 1998. ACM. Google ScholarDigital Library
- M. Fähndrich, J. Rehof, and M. Das. Scalable context sensitive flow analysis using instantiation constraints. In PLDI, PLDI '00, pages 253--263, New York, NY, USA, 2000. ACM. Google ScholarDigital Library
- B. Hardekopf. Homepage, http://www.cs.utexas.edu/users/benh/.Google Scholar
- B. Hardekopf and C. Lin. Exploiting pointer and location equivalence to optimize pointer analysis. In H. R. Nielson and G. Filé, editors, SAS, volume 4634 of Lecture Notes in Computer Science, pages 265--280. Springer, 2007. Google ScholarDigital Library
- B. Hardekopf and C. Lin. The ant and the grasshopper: fast and accurate pointer analysis for millions of lines of code. In PLDI, PLDI '07, pages 290--299, New York, NY, USA, 2007. ACM. Google ScholarDigital Library
- N. Heintze and O. Tardieu. Ultra-fast aliasing analysis using cla: a million lines of c code in a second. In PLDI, PLDI '01, pages 254--263, New York, NY, USA, 2001. ACM. Google ScholarDigital Library
- M. Hind and A. Pioli. Which pointer analysis should i use? In ISSTA, ISSTA '00, pages 113--123, New York, NY, USA, 2000. ACM. Google ScholarDigital Library
- V. Kahlon. Bootstrapping: a technique for scalable flow and context sensitive pointer alias analysis. In PLDI, PLDI '08, pages 249--259, New York, NY, USA, 2008. ACM. Google ScholarDigital Library
- A. Kanamori and D. Weise. Worklist management strategies for dataflow analysis, MSR Technical Report, MSR-TR-94-12, 1994.Google Scholar
- C. Lattner, A. Lenharth, and V. Adve. Making context-sensitive pointsto analysis with heap cloning practical for the real world. In PLDI, PLDI '07, pages 278--289, New York, NY, USA, 2007. ACM. Google ScholarDigital Library
- T. Lengauer and R. E. Tarjan. A fast algorithm for finding dominators in a flowgraph. ACM Trans. Program. Lang. Syst., 1(1):121--141, Jan. 1979. ISSN 0164-0925. doi: 10.1145/357062.357071. URL http://doi.acm.org/10.1145/357062.357071. Google ScholarDigital Library
- O. Lhoták and L. Hendren. Scaling java points-to analysis using spark. In Proceedings of the 12th international conference on Compiler construction, CC'03, pages 153--169, Berlin, Heidelberg, 2003. Springer-Verlag. Google ScholarDigital Library
- R. Nasre. Scaling context-sensitive points-to analysis, Ph.D. Thesis, CSA, Indian Institute of Science, 2012.Google Scholar
- R. Nasre and R. Govindarajan. Points-to analysis as a system of linear equations. In Proceedings of the 17th international conference on Static analysis, SAS'10, pages 422--438, Berlin, Heidelberg, 2010. Springer-Verlag. ISBN 3-642-15768-8, 978-3-642-15768-4. URL http://portal.acm.org/citation.cfm?id=1882094.1882120. Google ScholarDigital Library
- R. Nasre and R. Govindarajan. Prioritizing constraint evaluation for efficient points-to analysis. In CGO, CGO '11, 2011. Google ScholarDigital Library
- R. Nasre, K. Rajan, R. Govindarajan, and U. P. Khedker. Scalable context-sensitive points-to analysis using multi-dimensional bloomfilters. In Proceedings of the 7th Asian Symposium on Programming Languages and Systems, APLAS '09, pages 47--62, Berlin, Heidelberg, 2009. Springer-Verlag. ISBN 978-3-642-10671-2. Google ScholarDigital Library
- D. J. Pearce, P. H. J. Kelly, and C. Hankin. Online cycle detection and difference propagation: Applications to pointer analysis. Software Quality Control, 12:311--337, December 2004. Google ScholarDigital Library
- F. M. Q. Pereira and D. Berlin. Wave propagation and deep propagation for pointer analysis. In CGO, CGO '09, pages 126--135, Washington, DC, USA, 2009. IEEE Computer Society. Google ScholarDigital Library
- pereiraweb. Wave propagation / deep propagation website, http://compilers.cs.ucla.edu/fernando/projects/pta/home/.Google Scholar
- G. Ramalingam. The undecidability of aliasing. ACM Trans. Program. Lang. Syst., 16:1467--1471, September 1994. ISSN 0164-0925. doi: http://doi.acm.org/10.1145/186025.186041. URL http://doi.acm.org/10.1145/186025.186041. Google ScholarDigital Library
- G. Ramalingam and T. Reps. An incremental algorithm for maintaining the dominator tree of a reducible flowgraph. In PLDI, POPL '94, pages 287--296, New York, NY, USA, 1994. ACM. Google ScholarDigital Library
- A. Rountev and S. Chandra. Off-line variable substitution for scaling points-to analysis. In PLDI, PLDI '00, pages 47--56, New York, NY, USA, 2000. ACM. Google ScholarDigital Library
- O. G. Shivers. Control-flow analysis of higher-order languages PhD Thesis, Carnegie Mellon University, 1991. Google ScholarDigital Library
- B. Steensgaard. Points-to analysis in almost linear time. I POPL, POPL '96, pages 32--41, New York, NY, USA, 1996. ACM. Google ScholarDigital Library
- J. Whaley and M. S. Lam. An efficient inclusion-based pointsto analysis for strictly-typed languages. In Proceedings of the 9th International Symposiumon Static Analysis, SAS '02, pages 180--195, London, UK, 2002. Springer-Verlag. Google ScholarDigital Library
- J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the ACMSIGPLAN 2004 conference on Programming language design and implementation, PLDI '04, pages 131--144, New York, NY, USA, 2004. ACM. ISBN 1-58113-807-5. doi: http://doi.acm.org/10.1145/996841.996859. URL http://doi.acm.org/10.1145/996841.996859. Google ScholarDigital Library
Index Terms
- Exploiting the structure of the constraint graph for efficient points-to analysis
Recommendations
Exploiting the structure of the constraint graph for efficient points-to analysis
ISMM '12: Proceedings of the 2012 international symposium on Memory ManagementPoints-to analysis is a key compiler analysis. Several memory related optimizations use points-to information to improve their effectiveness. Points-to analysis is performed by building a constraint graph of pointer variables and dynamically updating it ...
Introspective analysis: context-sensitivity, across the board
PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and ImplementationContext-sensitivity is the primary approach for adding more precision to a points-to analysis, while hopefully also maintaining scalability. An oft-reported problem with context-sensitive analyses, however, is that they are bi-modal: either the analysis ...
Hybrid context-sensitivity for points-to analysis
PLDI '13: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and ImplementationContext-sensitive points-to analysis is valuable for achieving high precision with good performance. The standard flavors of context-sensitivity are call-site-sensitivity (kCFA) and object-sensitivity. Combining both flavors of context-sensitivity ...
Comments