| | |
Summary: Forma: A Framework for Safe Automatic Array
Reshaping
PENG ZHAO,
University of Alberta
SHIMIN CUI, YAOQING GAO, RA´UL SILVERA
IBM Toronto Software Laboratory,
and
JOS´E NELSON AMARAL
University of Alberta
This paper presents Forma, a practical, safe, and automatic data reshaping framework that re-
organizes arrays to improve data locality. Forma splits large aggregated data types into smaller
ones to improve data locality. Arrays of these large data types are then replaced by multiple
arrays of the smaller types. These new arrays form natural data streams that have smaller mem-
ory footprints, better locality, and are more suitable for hardware stream prefetching. Forma
consists of a field-sensitive alias analyzer, a data type checker, a portable structure reshaping
planner, and an array reshaper. An extensive experimental study compares different data reshap-
ing strategies in two dimensions: (1) how the data structure is split into smaller ones (maximal
partition × frequency-based partition × affinity-based partition); and (2) how partitioned arrays
are linked to preserve program semantics (address arithmetic-based reshaping × pointer-based
reshaping). This study exposes important characteristics of array reshaping. First, a practical
|