Automatic pool allocation: Improving performance by controlling data structure layout in the heap

Chris Lattner, Vikram Adve

Research output: Contribution to conferencePaper

Abstract

This paper describes Automatic Pool Allocation, a transformation framework that segregates distinct instances of heap-based data structures into seperate memory pools and allows heuristics to be used to partially control the internal layout of those data structures. The primary goal of this work is performance improvement, not automatic memory management, and the paper makes several new contributions. The key contribution is a new compiler algorithm for partitioning heap objects in imperative programs based on a context-sensitive pointer analysis, including a novel strategy for correct handling of indirect (and potentially unsafe) function calls. The transformation does not require type safe programs and works for the full generality of C and C++. Second, the paper describes several optimizations that exploit data structure partitioning to further improve program performance. Third, the paper evaluates how memory hierarchy behavior and overall program performance are impacted by the new transformations. Using a number of bench-marks and a few applications, we find that compilation times are extremely low, and overall running times for heap intensive programs speed up by 10-25% in many cases, about 2x in two cases, and more than 10x in two small benchmarks. Overall, we believe this work provides a new framework for optimizing pointer intensive programs by segregating and controlling the layout of heap-based data structures.

Original languageEnglish (US)
Pages129-142
Number of pages14
StatePublished - Dec 1 2005
Event2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 05 - Chicago, IL, United States
Duration: Jun 12 2005Jun 15 2005

Other

Other2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 05
CountryUnited States
CityChicago, IL
Period6/12/056/15/05

    Fingerprint

Keywords

  • Cache, static analysis
  • Data layout
  • Pool allocation
  • Recursive data structure

ASJC Scopus subject areas

  • Software

Cite this

Lattner, C., & Adve, V. (2005). Automatic pool allocation: Improving performance by controlling data structure layout in the heap. 129-142. Paper presented at 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 05, Chicago, IL, United States.