Abstract
By rearranging the data, data layout optimizations improve the utilization of a cache line between two of its successive refills, thus reducing the total number of cache line refills and improving the performance of a program. In this paper, we show that to enable structure data layout optimizations to be effective, two parameters, namely intra-instance affinity and inter-instance affinity, need to be considered at the same time in order to model the cache line utilization more accurately. We also propose a lightweight approach to measure intra-instance affinity and inter-instance affinity to avoid complex memory trace analyses. A prototype, called ASLOP, has been implemented in the Open64 compiler and evaluated using benchmarks from SPEC CPU 2000, SPEC CPU 2006 and Olden benchmark suites that have extensive structure types. Our approach can achieve up to 48.1% performance improvement over the original programs, and 11.9% over the optimized programs using maximal reshaping, an existing approach that is known to produce close to the best results, on the two platforms we tested.
Similar content being viewed by others
References
Zhong Y, Orlovich M, Shen X, et al. Array regrouping and structure splitting using whole-program reference affinity. In: Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation, 2004. 255–266
Zhao P, Cui S, Gao Y, et al. Forma: A framework for safe automatic array reshaping. ACM Trans Progr Lang Syst, 2007, 30: article 2
Petrank E, Rawitz D. The hardness of cache conscious data placement. In: Proceedings of the 29th ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, 2002. 101–112
Open64 compiler. http://www.open64.net
Hundt R, Mannarswamy S, Chakrabarti D R. Practical structure layout optimization and advice. In: Fourth IEEE/ACM International Symposium on Code Generation and Optimization (CGO 2006), 2006. 233–244
SPEC CPU 2000 Benchmark Suite. http://www.spec.org
SPEC CPU 2006 Benchmark Suite. http://www.spec.org
Rogers A, Carlisle M C, Reppy J H, et al. Supporting dynamic data structures on distributed-memory machines. ACM Trans Progr Lang Syst, 1995, 17: 233–263
Truong D N, Bodin F, Seznec A. Improving cache behavior of dynamically allocated data structures. In: Proceedings of the 1998 International Conference on Parallel Architectures and Compilation Techniques, 1998. 322–329
Chilimbi T M, Hill M D, Larus J R. Cache-conscious structure layout. In: Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, Atlanta, Georgia, USA, 1999. 1–12
Kistler T, Franz M. Automated data-member layout of heap objects to improve memory-hierarchy performance. ACM Trans Progr Lang Syst, 2000, 22: 490–505
Rabbah R M, Palem K V. Data remapping for design space optimization of embedded memory systems. ACM Trans Embed Comput Syst, 2003, 2: 186–218
Curial S, Zhao P, Amaral J N, et al. Mpads: memory-pooling-assisted data splitting. In: Proceedings of the 7th International Symposium on Memory Management, Tucson, Arizona, USA, 2008. 101–110
Chilimbi T M, Davidson B, Larus J R. Cache-conscious structure definition. In: Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, Atlanta, Georgia, USA, 1999. 13–24
Strout M M, Carter L, Ferrante J. Compile-time composition of run-time data and iteration reorderings. In: Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation 2003, San Diego, California, USA, 2003. 91–102
Zhong Y, Shen X, Ding C. A hierarchical model of reference affinity. In: Languages and Compilers for Parallel Computing, 16th International Workshop, LCPC 2003, College Station, Texas, USA, 2003. 48–63
Jeon J, Shin K, Han H. Layout transformations for heap objects using static access patterns. In: Compiler Construction, 16th International Conference, March 26–30, 2007, Proceedings, Braga, Portugal, 2007. 187–201
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Yan, J., He, J., Chen, W. et al. ASLOP: A field-access affinity-based structure data layout optimizer. Sci. China Inf. Sci. 54, 1769–1783 (2011). https://doi.org/10.1007/s11432-011-4265-0
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11432-011-4265-0