A fast and accurate framework to analyze and optimize cache memory behavior

  • Authors:
  • Xavier Vera;Nerina Bermudo;Josep Llosa;Antonio González

  • Affiliations:
  • Universitat Politècnica de Catalunya-Barcelona, Barcelona, Spain;Universitat Politècnica de Catalunya-Barcelona, Barcelona, Spain;Universitat Politècnica de Catalunya-Barcelona, Barcelona, Spain;Universitat Politècnica de Catalunya-Barcelona, Barcelona, Spain

  • Venue:
  • ACM Transactions on Programming Languages and Systems (TOPLAS)
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

The gap between processor and main memory performance increases every year. In order to overcome this problem, cache memories are widely used. However, they are only effective when programs exhibit sufficient data locality. Compile-time program transformations can significantly improve the performance of the cache. To apply most of these transformations, the compiler requires a precise knowledge of the locality of the different sections of the code, both before and after being transformed.Cache miss equations (CMEs) allow us to obtain an analytical and precise description of the cache memory behavior for loop-oriented codes. Unfortunately, a direct solution of the CMEs is computationally intractable due to its NP-complete nature.This article proposes a fast and accurate approach to estimate the solution of the CMEs. We use sampling techniques to approximate the absolute miss ratio of each reference by analyzing a small subset of the iteration space. The size of the subset, and therefore the analysis time, is determined by the accuracy selected by the user. In order to reduce the complexity of the algorithm to solve CMEs, effective mathematical techniques have been developed to analyze the subset of the iteration space that is being considered. These techniques exploit some properties of the particular polyhedra represented by CMEs.