Skip to main content
Log in

ASLOP: A field-access affinity-based structure data layout optimizer

  • Research Papers
  • Published:
Science China Information Sciences Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. 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

  2. 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

  3. 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

  4. Open64 compiler. http://www.open64.net

  5. 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

  6. SPEC CPU 2000 Benchmark Suite. http://www.spec.org

  7. SPEC CPU 2006 Benchmark Suite. http://www.spec.org

  8. 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

    Article  Google Scholar 

  9. 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

  10. 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

  11. 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

    Article  Google Scholar 

  12. 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

    Article  Google Scholar 

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to JiaNian Yan.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11432-011-4265-0

Keywords

Navigation