ABSTRACT
Data-layout optimizations rearrange fields within objects, objects within objects, and objects within the heap, with the goal of increasing spatial locality. While the importance of data-layout optimizations has been growing, their deployment has been limited, partly because they lack a unifying framework. We propose a parameterizable framework for data-layout optimization of general-purpose applications. Acknowledging that finding an optimal layout is not only NP-hard, but also poorly approximable, our framework finds a good layout by searching the space of possible layouts, with the help of profile feedback. The search process iteratively prototypes candidate data layouts, evaluating them by "simulating" the program on a representative trace of memory accesses. To make the search process practical, we develop space-reduction heuristics and optimize the expensive simulation via memoization. Equipped with this iterative approach, we can synthesize layouts that outperform existing non-iterative heuristics, tune application-specific memory allocators, as well as compose multiple data-layout optimizations.
- 1.ALT,M.,FERDINAND,C.,MARTIN,F.,AND WILHELM,R. Cache behavior prediction by abstract interpretation. Lecture Notes in Computer Science 1145 (1996), 52-66. Google ScholarDigital Library
- 2.BARRETT,D.A.,AND ZORN, B. G. Using lifetime predictors to improve memory allocation performance. In Proceedings of PLDI'93, Conference on Programming Languages Design and Implementation (Albuquerque, NM, June 1993), pp. 187- 196. Google ScholarDigital Library
- 3.CALDER,B.,CHANDRA,K.,JOHN,S.,AND AUSTIN, T. Cacheconscious data placement. In Proceedings of ASPLOS'98, Conference on Architectural Support for Programming Languages and Operating Systems (San Jose CA, 1998). Google ScholarDigital Library
- 4.CARR,S.,MCKINLEY,K.S.,AND TSENG, C.-W. Compiler optimizations for improving data locality. In Proceedings of ASPLOS'94, Conference on Architectural Support for Programming Languages and Operating Systems (Boston, MA, Oct. 1994), pp. 252-262. Google ScholarDigital Library
- 5.CHATTERJEE,S.,PARKER,E.,HANLON,P.J.,AND LEBECK, A. R. Exact analysis of the cache behavior of nested loops. In Proceedings of PLDI'01, Conference on Programming Languages Design and Implementation (Snowbird, UT, June 2001), pp. 286-297. Google ScholarDigital Library
- 6.CHILIMBI, T. M. Efficient representations and abstractions for quantifying and exploiting data reference locality. In Proceedings of PLDI'01, Conference on Programming Languages Design and Implementation (Snowbird, UT, June 2001), pp. 191-202. Google ScholarDigital Library
- 7.CHILIMBI,T.M.,DAVIDSON,B.,AND LARUS, J. R. Cacheconscious structure definition. In Proceedings of PLDI'99, Conference on Programming Languages Design and Implementation (Atlanta, GA, May 1999), pp. 13-24. Google ScholarDigital Library
- 8.CHILIMBI,T.M.,HILL,M.D.,AND LARUS, J. R. Cache-conscious structure layout. In Proceedings of PLDI'99, Conference on Programming Languages Design and Implementation (Atlanta, GA, May 1999), pp. 1-12. Google ScholarDigital Library
- 9.CHILIMBI,T.M.,AND LARUS, J. R. Using generational garbage collection to implement cache-conscious data placement. In Proceedings of the International Symposium on Memory Management (ISMM-98), vol. 34, 3 of ACM SIGPLAN Notices, pp. 37-48. Google ScholarDigital Library
- 10.DENNING,P.J.,AND SCHWARTZ, S. C. Properties of the working set model. Communications of the ACM15,3 (Mar.1972), 191-198. Google ScholarDigital Library
- 11.DOLBY,J.,AND CHIEN, A. An automatic object inlining optimization and its evaluation. In Proceedings of PLDI'00, Conference on Programming Languages Design and Implementation (Vancuver, Canada, June 2000), pp. 345-357. Google ScholarDigital Library
- 12.DUTT, S. New faster kernighan-lin-type graphpartitioning algorithms. In Proceedings of the IEEE/ACM International Conference on Computer-Aided Design (Santa Clara, CA, Nov. 1993), M. Lightner, Ed., IEEE Computer Society Press, pp. 370-377. Google ScholarDigital Library
- 13.FERDINAND,C.,AND WILHELM, R. Fast and efficient cache behavior prediction.Google Scholar
- 14.GANNON,D.,JALBY,W.,AND GALLIVAN,K.Strategiesfor cache and local memory management by global programming transformation. Journal of Parallel and Distributed Computing 5, 5 (Oct. 1988), 587-616. Google ScholarDigital Library
- 15.KISTLER,T.,AND FRANZ, M. Automated data-member layout of heap objects to improve memory-hierarchy performance. ACM Transactions on Programming Languages and Systems 22, 3 (2000), 490-505. Google ScholarDigital Library
- 16.LAMARCA,A.,AND LADNER, R. E. The influence of caches on the performance of heaps. ACM Journal of Experimental Algorithms 1 (1996), 4. Google ScholarDigital Library
- 17.MITCHELL,T.M.Machine learning. McGraw Hill, New York, US, 1996. Google ScholarDigital Library
- 18.PATTERSON,D.A.,AND HENNESSY,J.L.Computer Architecture: A Quantitative Approach. Morgan Kaufmann, Inc., San Mateo, CA, 1990. Google ScholarDigital Library
- 19.PATTERSON,D.A.,AND HENNESSY,J.L.Computer Organization and Design: Hardware and Software Interface. Morgan Kaufmann Publishers, San Mateo, California, June 1993. Google ScholarDigital Library
- 20.PETRANK,E.,AND RAWITZ, D. The hardness of cache conscious data placement. In Proceedings of POPL'02, Conference on Principles of Programming Languages (Portland, OR, Jan. 2002). Google ScholarDigital Library
- 21.RUBIN,S.,BERNSTEIN,D.,AND RODEH, M. Virtual cache line: A new technique to improve cache exploitation for recursive data structures. Lecture Notes in Computer Science 1575 (1999), 259-273. Google ScholarDigital Library
- 22.SAGIV,M.,REPS,T.,AND WILHELM, R. Parametric shape analysis via 3-valued logic. In Proceedings of POPL'99 Conference on Principles of Programming Languages (San Antonio, TX, Jan. 1999), pp. 105-118. Google ScholarDigital Library
- 23.SEIDL,M.L.,AND ZORN, B. G. Segregating heap objects by reference behavior and lifetime. In Proceedings of ASP- LOS'98, Conference on Architectural Support for Programming Languages and Operating Systems (San Jose, CA, Oct. 1998), pp. 12-23. Google ScholarDigital Library
- 24.TRUONG,D.N.,BODIN,F.,AND SEZNEC, A. Improving cache behavior of dynamically allocated data structures. In Proceedings of PACT'98, Conference on Parallel Architectures and Compilation Techniques (Paris, France, Oct. 1998), pp. 322- 329. Google ScholarDigital Library
- 25.VAN DER WAL, R. Programmer's toolchest: Source-code profilers for Win32. Dr. Dobb's Journal of Software Tools 23,3 (Mar. 1998), 78, 80, 82-88.Google Scholar
- 26.WOLF,M.E.,AND LAM, M. S. A data locality optimizing algorithm. In Proceedings of PLDI'91, Conference on Proramming Languages Design and Implementation (Toronto, Canada, June 1991), pp. 30-44. Google ScholarDigital Library
Recommendations
An efficient profile-analysis framework for data-layout optimizations
Data-layout optimizations rearrange fields within objects, objects within objects, and objects within the heap, with the goal of increasing spatial locality. While the importance of data-layout optimizations has been growing, their deployment has been ...
Quasidynamic Layout Optimizations for Improving Data Locality
Compiler-directed locality optimization techniques are effective in reducing the number of cycles spent in off-chip memory accesses. Recently, methods have been developed that transform memory layouts of data structures at compile-time to improve ...
A compiler framework for general memory layout optimizations targeting structures
INTERACT-14: Proceedings of the 2010 Workshop on Interaction between Compilers and Computer ArchitectureThis paper presents a novel approach which integrates both structure layout optimization and array flattening in a unified compiler framework to improve memory locality and reduce required memory bandwidth. The proposed compiler framework includes alias ...
Comments