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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
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)
Hagog, M., Tice, C.: Cache aware data layout reorganization optimization in GCC. In: Proceedings of the GCC Developers’ Summit, pp. 69–92 (2005)
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)
Lattner, C.: Macroscopic Data Structure Analysis and Optimization. PhD thesis (May 2005), http://llvm.cs.uiuc.edu
Lattner, C., Adve, V.: Automatic pool allocation for disjoint data structures. SIGPLAN Not. 38(2 suppl.), 13–24 (2003)
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)
Lattner, C., Adve, V.: Automatic pool allocation: improving performance by controlling data structure layout in the heap. SIGPLAN Not. 40(6), 129–142 (2005)
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)
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)
Rus, S., Rauchwerger, L., Hoeflinger, J.: Hybrid analysis: static & dynamic memory reference analysis. Int. J. Parallel Program 31(4), 251–283 (2003)
Saltz, J.H., Mirchandaney, R., Crowley, K.: Run-time parallelization and scheduling of loops. IEEE Trans. Comput. 40(5), 603–612 (1991)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)