Skip to main content

Automatic Restructuring of Linked Data Structures

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

Abstract

The memory subsystem is one of the major performance bottlenecks in modern computer systems. While much effort is spent on the optimization of codes which access data regularly, not all codes will do so. Programs using pointer linked data structures are notorious for producing such so called irregular memory access patterns. In this paper, we present a compilation and run-time framework that enables fully automatic restructuring of pointer-linked data structures for type-unsafe languages, such as C. The restructuring framework is based on run-time restructuring using run-time trace information. The compiler transformation chain first identifies disjoint data structures that are stored in type-homogeneous memory pools. Access to these pools is traced and from these run-time traces, a permutation vector is derived. The memory pool is restructured at run-time using this permutation, after which all pointers (both stack and heap) that refer to the restructured pool must be updated. While the run-time tracing incurs a considerable overhead, we show that restructuring pointer-linked data structures can yield substantial speedups and that in general, the incurred overhead is compensated for by the performance improvements.

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. Bender, M.A., Hu, H.: An adaptive packed-memory array. In: PODS 2006: Proceedings of the twenty-fifth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pp. 20–29. ACM Press, New York (2006)

    Chapter  Google Scholar 

  2. Curial, S., Zhao, P., Amaral, J.N., Gao, Y., Cui, S., Silvera, R., Archambault, R.: Mpads: memory-pooling-assisted data splitting. In: ISMM 2008: Proceedings of the 7th international symposium on Memory management, pp. 101–110. ACM, New York (2008)

    Chapter  Google Scholar 

  3. Hagog, M., Tice, C.: Cache aware data layout reorganization optimization in GCC. In: Proceedings of the GCC Developers’ Summit, pp. 69–92 (2005)

    Google Scholar 

  4. Hwang, Y.-S., Saltz, J.H.: Identifying def/use information of statements that construct and traverse dynamic recursive data structures. In: Huang, C.-H., Sadayappan, P., Sehr, D. (eds.) LCPC 1997. LNCS, vol. 1366, pp. 131–145. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  5. Lattner, C.: Macroscopic Data Structure Analysis and Optimization. PhD thesis (May 2005), http://llvm.cs.uiuc.edu

  6. Lattner, C., Adve, V.: Automatic pool allocation for disjoint data structures. SIGPLAN Not. 38(2 suppl.), 13–24 (2003)

    Article  Google Scholar 

  7. Lattner, C., Adve, V.: LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In: Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO 2004), Palo Alto, California (March 2004)

    Google Scholar 

  8. Lattner, C., Adve, V.: Automatic pool allocation: improving performance by controlling data structure layout in the heap. SIGPLAN Not. 40(6), 129–142 (2005)

    Article  Google Scholar 

  9. Lattner, C., Adve, V.S.: Transparent pointer compression for linked data structures. In: MSP 2005: Proceedings of the 2005 workshop on Memory system performance, pp. 24–35. ACM, New York (2005)

    Chapter  Google Scholar 

  10. Rubin, S., Bernstein, D., Rodeh, M.: Virtual cache line: A new technique to improve cache exploitation for recursive data structures. In: Jähnichen, S. (ed.) CC 1999. LNCS, vol. 1575, pp. 259–273. Springer, Heidelberg (1999)

    Google Scholar 

  11. Rus, S., Rauchwerger, L., Hoeflinger, J.: Hybrid analysis: static & dynamic memory reference analysis. Int. J. Parallel Program 31(4), 251–283 (2003)

    Article  MATH  Google Scholar 

  12. Saltz, J.H., Mirchandaney, R., Crowley, K.: Run-time parallelization and scheduling of loops. IEEE Trans. Comput. 40(5), 603–612 (1991)

    Article  Google Scholar 

  13. van der Spek, H.L.A., Bakker, E.M., Wijshoff, H.A.G.: Characterizing the performance penalties induced by irregular code using pointer structures and indirection arrays on the Intel Core 2 architecture. In: CF 2009: Proceedings of the 6th ACM conference on Computing frontiers, pp. 221–224. ACM, New York (2009)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

van der Spek, H.L.A., Holm, C.W.M., Wijshoff, H.A.G. (2010). Automatic Restructuring of Linked Data Structures. In: Gao, G.R., Pollock, L.L., Cavazos, J., Li, X. (eds) Languages and Compilers for Parallel Computing. LCPC 2009. Lecture Notes in Computer Science, vol 5898. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13374-9_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-13374-9_18

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-13373-2

  • Online ISBN: 978-3-642-13374-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics