Exact Analysis of the Cache Behavior of Nested Loops
Abstract
The authors develop from first principles an exact model of the behavior of loop nests executing in a memory hierarchy by using a nontraditional classification of misses that has the key property of composability. They use Presburger formulas to express various kinds of misses as well as the state of the cache at the end of the loop nest. They use existing tools to simplify these formulas and to count cache misses. The model is powerful enough to handle imperfect loop nests and various flavors of non-linear array layouts based on bit interleaving of array indices. They also indicate how to handle modest levels of associativity, and how to perform limited symbolic analysis of cache behavior. The complexity of the formulas relates to the static structure of the loop nest rather than to its dynamic trip count, allowing the model to gain efficiency in counting cache misses by exploiting repetitive patterns of cache behavior. Validation against cache simulation confirms the exactness of our formulation. Our method can serve as the basis for a static performance predictor to guide program and data transformations to improve performance.
Document Details
- Document Type
- Technical Report
- Publication Date
- Jan 01, 2001
- Accession Number
- ADA441135
Entities
People
- Alvin R. Lebeck
- Erin Parker
- Philip J. Hanlon
- Siddhartha Chatterjee
Organizations
- University of North Carolina at Chapel Hill