Advertisement

Science China Information Sciences

, Volume 54, Issue 9, pp 1769–1783 | Cite as

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

  • JiaNian Yan
  • JiangZhou He
  • WenGuang Chen
  • Pen-Chung Yew
  • WeiMin Zheng
Research Papers

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.

Keywords

compiler optimization data-layout optimization memory hierarchy inter-instance affinity intrainstance affinity 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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–266Google Scholar
  2. 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 2Google Scholar
  3. 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–112Google Scholar
  4. 4.
    Open64 compiler. http://www.open64.net
  5. 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–244Google Scholar
  6. 6.
    SPEC CPU 2000 Benchmark Suite. http://www.spec.org
  7. 7.
    SPEC CPU 2006 Benchmark Suite. http://www.spec.org
  8. 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–263CrossRefGoogle Scholar
  9. 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–329Google Scholar
  10. 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–12Google Scholar
  11. 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–505CrossRefGoogle Scholar
  12. 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–218CrossRefGoogle Scholar
  13. 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–110Google Scholar
  14. 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–24Google Scholar
  15. 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–102Google Scholar
  16. 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–63Google Scholar
  17. 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–201Google Scholar

Copyright information

© Science China Press and Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • JiaNian Yan
    • 1
  • JiangZhou He
    • 1
  • WenGuang Chen
    • 1
  • Pen-Chung Yew
    • 2
  • WeiMin Zheng
    • 1
  1. 1.Department of Computer Science and TechnologyTsinghua UniversityBeijingChina
  2. 2.Department of Computer Science and EngineeringUniversity of Minnesota at Twin-CitiesMinneapolisUSA

Personalised recommendations