Abstract
As the amount of data used by programs increases due to the growth of hardware storage capacity and computing power, efficient memory usage becomes a key factor for performance. Since modern applications heavily use structures allocated in the heap, this paper proposes an efficient structure layout based on static analyses. Unlike most of the previous work, our approach is an entirely static transformation of programs. We extract access patterns from source programs and represent them with regular expressions. Repetitive accesses are usually important pieces of information for locality optimizations. The expressive power of regular expressions is appropriate to represent those repetitive accesses along with various access patterns according to the control flow of programs. By interpreting statically obtained access patterns, we choose suitable structures for pool allocation and reorganize field layouts of the chosen structures. To verify the effect of our static optimization, we implement our analyses and optimizations with the CIL compiler. Our experiments with the Olden benchmarks demonstrate that layout transformations for heap objects based on our static access pattern analysis improve cache locality by 38% and performance by 24%.
This work was supported by grant No. R01-2006-000-11196-0 from the Basic Research Program of the Korea Science & Engineering Foundation.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Seidl, M.L., Zorn, B.G.: Segregating heap objects by reference behavior and lifetime. In: ASPLOS-VIII, Oct. 1998, pp. 12–23 (1998)
Lattner, C., Adve, V.: Automatic pool allocation: improving performance by controlling data structure layout in the heap. In: PLDI ’05, Jun. 2005, pp. 129–142 (2005)
Cherem, S., Rugina, R.: Region analysis and transformation for java programs. In: ISMM ’04: International Symposium on Memory Management, Oct. 2004, pp. 85–96 (2004)
Shen, X., et al.: Lightweight reference affinity analysis. In: ICS ’05: International Conference on Supercomputing, pp. 131–140 (2005)
Zhong, Y., et al.: Array regrouping and structure splitting using whole-program reference affinity. In: PLDI ’04, pp. 255–266 (2004)
Chilimbi, T.M., Davidson, B., Larus, J.R.: Cache-conscious structure definition. In: PLDI ’99, May 1999, pp. 13–24 (1999)
Rabbah, R.M., Palem, K.V.: Data remapping for design space optimization of embedded memory systems. ACM TECS 2(2), 186–218 (2003)
Shin, K., et al.: Restructuring field layouts for embedded memory systems. In: DATE ’06: Design, Automation and Test in Europe, Mar. 2006, pp. 937–942 (2006)
Tofte, M., Birkedal, L.: A region inference algorithm. ACM TOPLAS 20(4), 724–767 (1998)
Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to automata theory, languages, and computation, 2nd edn. Addison-Wesley, Reading (2001)
Tarjan, R.E.: A unified approach to path problems. J. ACM 28(3), 577–593 (1981)
Tarjan, R.E.: Fast algorithms for solving path problems. J. ACM 28(3), 594–614 (1981)
Bourdoncle, F.: Efficient chaotic iteration strategies with widenings. In: FMPA ’93: Formal Methods in Programming and their Applications, pp. 128–141 (1993)
Gloy, N., Smith, M.D.: Procedure placement using temporal-ordering information. ACM TOPLAS 21(5), 977–1027 (1999)
Necula, G.C., et al.: CIL: Intermediate language and tools for analysis and transformation of c programs. In: Horspool, R.N. (ed.) CC 2002 and ETAPS 2002. LNCS, vol. 2304, pp. 213–228. Springer, Heidelberg (2002)
Rogers, A., et al.: Supporting dynamic data structures on distributed-memory machines. ACM TOPLAS 17(2), 233–263 (1995)
Valgrind, http://valgrind.org/
McGill benchmark suite, http://llvm.org/
Austin, T.M., Breach, S.E., Sohi, G.S.: Efficient detection of all pointer and array access errors. ACM SIGPLAN Notices 29(6), 290–301 (1994)
Wheeler, D.A.: SLOCcount, http://www.dwheeler.com/sloccount/
Guyer, S.Z., McKinley, K.S.: Finding your cronies: static analysis for dynamic object colocation. In: OOPSLA ’04, pp. 237–250 (2004)
Huang, X., et al.: The garbage collection advantage: improving program locality. In: OOPSLA ’04, pp. 69–80 (2004)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer Berlin Heidelberg
About this paper
Cite this paper
Jeon, J., Shin, K., Han, H. (2007). Layout Transformations for Heap Objects Using Static Access Patterns. In: Krishnamurthi, S., Odersky, M. (eds) Compiler Construction. CC 2007. Lecture Notes in Computer Science, vol 4420. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71229-9_13
Download citation
DOI: https://doi.org/10.1007/978-3-540-71229-9_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-71228-2
Online ISBN: 978-3-540-71229-9
eBook Packages: Computer ScienceComputer Science (R0)