Skip to main content

Towards Compiler Optimization of Codes Based on Arrays of Pointers

  • Conference paper
Book cover Languages and Compilers for Parallel Computing (LCPC 2002)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 2481))

  • 547 Accesses

Abstract

To successfully exploit all the possibilities of current computer/multicomputer architectures, optimization compiling techniques are a must. However, for codes based on pointers and dynamic data structures these optimization techniques have to be necessarily carried out after identifying the characteristics and properties of the data structure used in the code. In this paper we present one method able to automatically identify complex dynamic data structures used in a code even in the presence of arrays of pointers. This method has been implemented in an analyzer which symbolically executes the input code to generate a set of graphs, called RSRSG (Reduced Set of Reference Shape Graphs), for each statement. Each RSRSG accurately describes the data structure configuration at each program point. In order to deal with arrays of pointers we have introduced two main concepts: the multireference class, and instances. Our analyzer has been validated with several codes based on complex data structures containing arrays of pointers which were successfully identified.

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. Barnes, J., Hut, P.: A Hierarchical O(n∙ log n) force calculation algorithm. Nature 324 (December 1986)

    Google Scholar 

  2. Chase, D., Wegman, M., Zadeck, F.: Analysis of Pointers and Structures. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 296–310. ACM Press, New York (1990)

    Google Scholar 

  3. Corbera, F.: Automatic Detection of Data Structures based on Pointers. Ph.D. Dissertation, Dept. Computer Architecture, Univ. of Málaga, Spain (2001)

    Google Scholar 

  4. Corbera, F., Asenjo, R., Zapata, E.L.: Accurate Shape Analysis for Recursive Data Structures. In: Midkiff, S.P., Moreira, J.E., Gupta, M., Chatterjee, S., Ferrante, J., Prins, J.F., Pugh, B., Tseng, C.-W. (eds.) LCPC 2000. LNCS, vol. 2017, p. 1. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  5. Corbera, F., Asenjo, R., Zapata, E.: Progressive Shape Analysis for Real C Codes. In: IEEE Int’l. Conf. on Parallel Processing (ICPP 2001), Valencia, Spain, September 3-7, pp. 373–380 (2001)

    Google Scholar 

  6. Ghiya, R., Hendren, L.: Is it a tree, a DAG, or a cyclic graph? A shape analysis for heapdirected pointers in C. In: Conference Record of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, January 1-24, pp. 1–15. St. Petersburg, Florida (1996)

    Chapter  Google Scholar 

  7. Hoeflinger, J., Paek, Y.: The Access Region Test. In: Carter, L., Ferrante, J. (eds.) LCPC 1999. LNCS, vol. 1863, p. 271. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  8. Horwitz, S., Pfeiffer, P., Reps, T.: Dependence Analysis for Pointer Variables. In: Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation, June 1989, pp. 28–40 (1989)

    Google Scholar 

  9. Hummel, J., Hendren, L.J., Nicolau, A.: A General Data Dependence Test for Dynamic, Pointer-Based Data Structures. In: Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation, pp. 218–229. ACM Press, New York (1994)

    Google Scholar 

  10. Jones, N., Muchnick, S.: Flow Analysis and Optimization of Lisp-like Structures. In: Muchnick, S., Jones, N. (eds.) Program Flow Analysis: Theory and Applications, ch. 4, pp. 102–131. Prentice Hall, Englewood Cliffs (1981)

    Google Scholar 

  11. Matsumoto, A., Han, D.S., Tsuda, T.: Alias Analysis of Pointers in Pascal and Fortran 90: Dependence Analysis between Pointer References. Acta Informatica 33, 99–130 (1996)

    Article  Google Scholar 

  12. Plevyak, J., Chien, A., Karamcheti, V.: Analysis of Dynamic Structures for Efficient Parallel Execution. In: Banerjee, U., Gelernter, D., Nicolau, A., Padua, D.A. (eds.) LCPC 1993. LNCS, vol. 768, pp. 37–57. Springer, Heidelberg (1994)

    Google Scholar 

  13. Sagiv, M., Reps, T., Wilhelm, R.: Solving Shape-Analysis problems in Languages with destructive updating. ACM Transactions on Programming Languages and Systems 20(1), 1–50 (1998)

    Article  Google Scholar 

  14. Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. In: Conference Record of the Twenty-Sixth ACM Symposium on Principles of Programming Languages, San Antonio, TX, January 20-22, pp. 105–118. ACM, New York (1999)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Corbera, F., Asenjo, R., Zapata, E.L. (2005). Towards Compiler Optimization of Codes Based on Arrays of Pointers. In: Pugh, B., Tseng, CW. (eds) Languages and Compilers for Parallel Computing. LCPC 2002. Lecture Notes in Computer Science, vol 2481. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11596110_10

Download citation

  • DOI: https://doi.org/10.1007/11596110_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-30781-5

  • Online ISBN: 978-3-540-31612-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics