Abstract
Irregular access patterns are a major problem for today’s optimizing compilers. In this paper, a novel approach will be presented that enables transformations that were designed for regular loop structures to be applied to linked list data structures. This is achieved by linearizing access to a linked list, after which further data restructuring can be performed. Two subsequent optimization paths will be considered: annihilation and sublimation, which are driven by the occurring regular and irregular access patterns in the applications. These intermediate codes are amenable to traditional compiler optimizations targeting regular loops. In the case of sublimation, a run-time step is involved which takes the access pattern into account and thus generates a data instance specific optimized code. Both approaches are applied to a sparse matrix multiplication algorithm and an iterative solver: preconditioned conjugate gradient. The resulting transformed code is evaluated using the major compilers for the x86 platform, GCC and the Intel C compiler.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Bender, M.A., Hu, H.: An adaptive packed-memory array. In: PODS ’06: Proceedings of the Twenty-Fifth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, pp. 20–29. ACM Press, New York, NY, USA (2006)
Bik, A.J.C. (ed.): Compiler Support for Sparse Matrices, PhD Thesis. Leiden University, The Netherlands (1996)
Bik, A.J.C., Knijenburg, P.M.W., Wijshoff, H.A.G.: Reshaping access patterns for generating sparse codes. In: LCPC ’94: Proceedings of the 7th International Workshop on Languages and Compilers for Parallel Computing, pp. 406–420. Springer-Verlag, London, UK (1994)
Bik A.J.C., Wijshoff H.A.G.: Advanced compiler optimizations for sparse computations. J. Parallel Distrib. Comput. 31(1), 14–24 (1995)
Bik A.J.C., Wijshoff H.A.G.: Automatic data structure selection and transformation for sparse matrix computations. IEEE Trans. Parallel Distrib. Syst. 7(2), 109–126 (1996)
Chilimbi, T.M., Davidson, B., Larus, J.R.: Cache-conscious structure definition. In: PLDI ’99: Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, pp. 13–24. ACM Press, New York, NY, USA (1999)
Chong, S., Rugina, R.: Static analysis of accessed regions in recursive data structures. In: Static Analysis, 10th International Symposium, SAS 2003, pp. 463–482 (2003)
Duff, I.S., Grimes, R.G., Lewis, J.G.: Users’ guide for the Harwell-Boeing sparse matrix collection (Release I). Technical Report RAL 92-086, Chilton, Oxon, England (1992)
Feldman S.I., Gay D.M., Maimone M.W., Schryer N.L.: A FORTRAN to C converter. SIGPLAN Fortran Forum 9(2), 21–22 (1990)
Ghiya, R.: Putting Pointer Analysis to Work, PhD Thesis. School of Computer Science, McGill University, Montreal, Canada (1998)
Ghiya, R., Hendren, L.J.: Is it a tree, a DAG, or a cyclic graph? A shape analysis for heap-directed pointers in C. In: POPL ’96: Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 1–15. ACM, New York, NY, USA (1996)
Ghiya, R., Hendren, L.J., Zhu, Y.: Detecting parallelism in C programs with recursive data structures. In: CC ’98: Proceedings of the 7th International Conference on Compiler Construction, pp. 159–173. Springer-Verlag, London, UK (1998)
Golovanevsky, O., Zaks, A.: Struct-reorg: current status and future perspectives. In: Proceedings of the GCC Developers’ Summit, pp. 47–56. http://www.gccsummit.org (2007)
Golub, G.H., Van Loan, C.F.: Matrix Computations. Johns Hopkins University Press, Baltimore (1989)
Groot, S., van der Spek, H.L.A., Bakker, E.M., Wijshoff, H.A.G.: The automatic transformation of linked list data structures (abstract). In: PACT ’07: Proceedings of the 16th Intenational Conference on Parallel Architectures and Compilation Techniques. IEEE Computer Society, Washington, DC, USA (2007)
Hagog, M., Tice, C.: Cache aware data layout reorganization optimization in GCC. In: Proceedings of the GCC Developers’ Summit, pp. 69–92. http://www.gccsummit.org (2005)
Hummel, J., Hendren, L.J., Nicolau, A.: A general data dependence test for dynamic, pointer-based data structures. In: PLDI ’94: Proceedings of the ACM SIGPLAN 1994 conference on Programming language Design and Implementation, pp. 218–229. ACM Press, New York, NY, USA (1994)
Hwang Y.-S., Saltz J.: Interprocedural definition-use chains of dynamic pointer-linked data structures. Sci. Program. 11(1), 3–37 (2003)
Karlsson, M., Dahlgren, F., Stenström, P.: A prefetching technique for irregular accesses to linked data structures. In: Proceedings of the Sixth International Symposium on High-Performance Computer Architecture, 8–12 January 2000, Toulouse, France, pp. 206–217. IEEE Computer Society, Washington, DC, USA (2000)
Kodukula I., Pingali K.: Data-centric transformations for locality enhancement. Int. J. Parallel Prog. 29(3), 319–364 (2001)
Langella, S., Hastings, S., Oster, S., Kurc, T., Catalyurek, U., Saltz, J.: A distributed data management middleware for data-driven application systems. In: CLUSTER ’04: Proceedings of the 2004 IEEE International Conference on Cluster Computing, Washington, DC, USA, pp. 267–276. IEEE Computer Society (2004)
Lattner, C., Adve, V.: Automatic pool allocation for disjoint data structures. In: MSP ’02: Proceedings of the 2002 Workshop on Memory System Performance, pp. 13–24. ACM, New York, NY, USA (2002)
Lin, Y., Padua, D.: Compiler analysis of irregular memory accesses. In: PLDI ’00: Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation, pp. 157–168. ACM Press, New York, NY, USA (2000)
Luk, C.-K., Mowry, T.C.: Compiler-based prefetching for recursive data structures. In: ASPLOS-VII: Proceedings of the Seventh International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 222–233. ACM Press, New York, NY, USA (1996)
NIST. Matrix Market. http://math.nist.gov/MatrixMarket (2007)
Padua D.A., Wolfe M.J.: Advanced compiler optimizations for supercomputers. Commun. ACM 29(12), 1184–1201 (1986)
Rubin, S., Bernstein, D., Rodeh, M.: Virtual cache line: a new technique to improve cache exploitation for recursive data structures. In: CC ’99: Proceedings of the 8th International Conference on Compiler Construction, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS’99, pp. 259–273. Springer-Verlag, London, UK (1999)
Rugina R., Rinard M.C.: Symbolic bounds analysis of pointers, array indices, and accessed memory regions. ACM Trans. Program. Lang. Syst. 27(2), 185–235 (2005)
Silvius R., Rauchwerger L., Hoeflinger J.: Hybrid analysis: static & dynamic memory reference analysis. Int. J. Parallel Prog. 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)
Weng, L., Agrawal, G., Catalyurek, U., Kurc, T., Narayanan, S., Saltz, J.: An approach for automatic data virtualization. In: HPDC ’04: Proceedings of the 13th IEEE International Symposium on High Performance Distributed Computing (HPDC ’04) pp. 24–33. IEEE Computer Society, Washington, DC, USA (2004)
Wijshoff, H.A.G.: Programming without bothering about data structures? IEEE Comput. Sci. Eng. IEEE Trans. Comput. (3), 67–68 (1996)
Yang, C.-L., Lebeck, A.R.: Push vs. pull: data movement for linked data structures. In: ICS ’00: Proceedings of the 14th International Conference on Supercomputing, pp. 176–186. ACM Press, New York, NY, USA (2000)
Zhao, L., Wijshoff, H.A.G.: A case study in automatic data structure selection for optimizing sparse matrix computations. In: Proceedings of the IEEE International Workshop on Advanced Compiler Technology for High Performance and Embedded Systems (IWACT), July 2001, Bucharest, Romania, pp. 22–55. Editura MATRIX ROM (2001)
Zhong, Y., Orlovich, M., Shen, X., Ding, C.: Array regrouping and structure splitting using whole-program reference affinity. In: PLDI ’04: Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation, pp. 255–266. ACM Press, New York, NY, USA (2004)
Open Access
This article is distributed under the terms of the Creative Commons Attribution Noncommercial License which permits any noncommercial use, distribution, and reproduction in any medium, provided the original author(s) and source are credited.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Open Access This is an open access article distributed under the terms of the Creative Commons Attribution Noncommercial License (https://creativecommons.org/licenses/by-nc/2.0), which permits any noncommercial use, distribution, and reproduction in any medium, provided the original author(s) and source are credited.
About this article
Cite this article
van der Spek, H.L.A., Groot, S., Bakker, E.M. et al. A Compile/Run-time Environment for the Automatic Transformation of Linked List Data Structures. Int J Parallel Prog 36, 592–623 (2008). https://doi.org/10.1007/s10766-008-0085-2
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10766-008-0085-2