Struct-reorg: Current status and future perspectives
Abstract
In this paper we present the ongoing effort to implement C structure optimizations in GCC, its current status and future plans. The general idea of this set of optimizations is to adapt the layout of a data-structure to its access patterns in order to better utilize the cache by increasing spatial locality. These optimizations are known to have many variations and require wide variety of data to be analyzed. An initial implementation of these optimizations in GCC was presented at the GCC Developers' Summit of 2005. Since then many changes took place, including updating to Tree-SSA and preparation for GCC mainline 4.3. Additional opportunities were revealed after close analysis of mcf benchmark from Spec2000/Spec2006.1 Struct-reorg relies on careful type escape analysis capabilities, which were provided by K. Zadeck and are now being enhanced to really utilize the Tree-SSA form. In addition, as this type of optimization requires the scope of whole program to be analyzed, it is a natural candidate to leverage the LTO effort. To prepare its transition to this level, we present optimization flow of data collection stage of struct-reorg optimizations from an LTO perspective.