Skip to main content

Liveness-Based Pointer Analysis

  • Conference paper
Static Analysis (SAS 2012)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7460))

Included in the following conference series:

Abstract

Precise flow- and context-sensitive pointer analysis (FCPA) is generally considered prohibitively expensive for large programs; most tools relax one or both of the requirements for scalability. We argue that precise FCPA has been over-harshly judged—the vast majority of points-to pairs calculated by existing algorithms are never used by any client analysis or transformation because they involve dead variables. We therefore formulate a FCPA in terms of a joint points-to and liveness analysis which we call L-FCPA. We implemented a naive L-FCPA in GCC-4.6.0 using linked lists. Evaluation on SPEC2006 showed significant increase in the precision of points-to pairs compared to GCC’s analysis. Interestingly, our naive implementation turned out to be faster than GCC’s analysis for all programs under 30kLoC. Further, L-FCPA showed that fewer than 4% of basic blocks had more than 8 points-to pairs. We conclude that the usable points-to information and the required context information is small and sparse and argue that approximations (e.g. weakening flow or context sensitivity) are not only undesirable but also unnecessary for performance.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Khedker, U.P., Sanyal, A., Karkare, B.: Data Flow Analysis: Theory and Practice. CRC Press Inc. (2009)

    Google Scholar 

  2. Kildall, G.A.: A unified approach to global program optimization. In: Proc. of POPL 1973, pp. 194–206 (1973)

    Google Scholar 

  3. Emami, M., Ghiya, R., Hendren, L.J.: Context-sensitive interprocedural points-to analysis in the presence of function pointers. In: Proc. of PLDI 1994, pp. 242–256 (1994)

    Google Scholar 

  4. Kanade, A., Khedker, U.P., Sanyal, A.: Heterogeneous Fixed Points with Application to Points-To Analysis. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 298–314. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  5. Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (1994)

    Google Scholar 

  6. Steensgaard, B.: Points-to analysis in almost linear time. In: Proc. of POPL 1996, pp. 32–41 (1996)

    Google Scholar 

  7. Sharir, M., Pnueli, A.: Two approaches to interprocedural data flow analysis. In: Muchnick, S.S., Jones, N.D. (eds.) Program Flow Analysis: Theory and Applications. Prentice-Hall Inc. (1981)

    Google Scholar 

  8. Reps, T., Horwitz, S., Sagiv, M.: Precise interprocedural dataflow analysis via graph reachability. In: Proc. of POPL 1995, pp. 49–61 (1995)

    Google Scholar 

  9. Knoop, J., Steffen, B.: The Interprocedural Coincidence Theorem. In: Pfahler, P., Kastens, U. (eds.) CC 1992. LNCS, vol. 641, pp. 125–140. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  10. Khedker, U.P., Karkare, B.: Efficiency, Precision, Simplicity, and Generality in Interprocedural Data Flow Analysis: Resurrecting the Classical Call Strings Method. In: Hendren, L. (ed.) CC 2008. LNCS, vol. 4959, pp. 213–228. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  11. Lhoták, O., Chung, K.A.: Points-to analysis with efficient strong updates. In: Proc. of POPL 2011, pp. 3–16 (2011)

    Google Scholar 

  12. Lhoták, O., Hendren, L.: Context-Sensitive Points-to Analysis: Is It Worth It? In: Mycroft, A., Zeller, A. (eds.) CC 2006. LNCS, vol. 3923, pp. 47–64. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  13. Ruf, E.: Context-insensitive alias analysis reconsidered. In: Proc. of PLDI 1995, pp. 13–22 (1995)

    Google Scholar 

  14. Shapiro, M., Horwitz, S.: The Effects of the Precision of Pointer Analysis. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, pp. 16–34. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  15. Hind, M., Pioli, A.: Assessing the Effects of Flow-Sensitivity on Pointer Alias Analyses. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 57–81. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  16. Hardekopf, B.C., Lin, C.: The ant and the grasshopper: Fast and accurate pointer analysis for millions of lines of code. In: Proc. of PLDI 2007, pp. 290–299 (2007)

    Google Scholar 

  17. Smaragdakis, Y., Bravenboer, M., Lhoták, O.: Pick your contexts well: Understanding object-sensitivity. In: Proc. of POPL 2011, pp. 17–30 (2011)

    Google Scholar 

  18. Guyer, S.Z., Lin, C.: Client-Driven Pointer Analysis. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 214–236. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  19. Heintze, N., Tardieu, O.: Demand-driven pointer analysis. In: Proc. of PLDI 2001, pp. 24–34 (2001)

    Google Scholar 

  20. Sridharan, M., Gopan, D., Shan, L., Bodík, R.: Demand-driven points-to analysis for Java. In: Proc. of OOPSLA 2005, pp. 59–76 (2005)

    Google Scholar 

  21. Zheng, X., Rugina, R.: Demand-driven alias analysis for C. In: Proc. of POPL 2008, pp. 197–208 (2008)

    Google Scholar 

  22. Rosen, B.K.: Linear cost is sometimes quadratic. In: Proc. of POPL 1981, pp. 117–124 (1981)

    Google Scholar 

  23. Whaley, J., Lam, M.S.: Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In: Proc. of PLDI 2004, pp. 131–144 (2004)

    Google Scholar 

  24. Choi, J.D., Cytron, R., Ferrante, J.: On the efficient engineering of ambitious program analysis. IEEE Trans. Softw. Eng. 20, 105–114 (1994)

    Article  Google Scholar 

  25. Chow, F.C., Chan, S., Liu, S.-M., Lo, R., Streich, M.: Effective Representation of Aliases and Indirect Memory Operations in SSA Form. In: Gyimóthy, T. (ed.) CC 1996. LNCS, vol. 1060, pp. 253–267. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  26. Hasti, R., Horwitz, S.: Using static single assignment form to improve flow-insensitive pointer analysis. In: Proc. of PLDI 1998, pp. 97–105 (1998)

    Google Scholar 

  27. Yu, H., Xue, J., Huo, W., Feng, X., Zhang, Z.: Level by level: making flow- and context-sensitive pointer analysis scalable for millions of lines of code. In: Proc. of CGO 2010, pp. 218–229 (2010)

    Google Scholar 

  28. Wilson, R.P., Lam, M.S.: Efficient context-sensitive pointer analysis for C programs. In: Proc. of POPL 1995, pp. 1–12 (1995)

    Google Scholar 

  29. Kahlon, V.: Bootstrapping: a technique for scalable flow and context-sensitive pointer alias analysis. In: Proc. of PLDI 2008, pp. 249–259 (2008)

    Google Scholar 

  30. Milanova, A., Rountev, A., Ryder, B.G.: Parameterized object sensitivity for points-to analysis for Java. ACM Trans. Softw. Eng. Methodol. 14, 1–41 (2005)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Khedker, U.P., Mycroft, A., Rawat, P.S. (2012). Liveness-Based Pointer Analysis. In: Miné, A., Schmidt, D. (eds) Static Analysis. SAS 2012. Lecture Notes in Computer Science, vol 7460. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-33125-1_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-33125-1_19

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-33124-4

  • Online ISBN: 978-3-642-33125-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics