WCET-driven cache-aware code positioning

  • Authors:
  • Heiko Falk;Helena Kotthaus

  • Affiliations:
  • Ulm University, Ulm, Germany;Technische Universität Dortmund, Dortmund, Germany

  • Venue:
  • CASES '11 Proceedings of the 14th international conference on Compilers, architectures and synthesis for embedded systems
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Code positioning is a well-known compiler optimization aiming at the improvement of the instruction cache behavior. A contiguous mapping of code fragments in memory avoids overlapping of cache sets and thus decreases the number of cache conflict misses. We present a novel cache-aware code positioning optimization driven by worst-case execution time (WCET) information. For this purpose, we introduce a formal cache model based on a conflict graph which is able to capture a broad class of cache architectures. This cache model is combined with a formal WCET timing model, resulting in a cache conflict graph weighted with WCET data. This conflict graph is then exploited by heuristics for code positioning of both basic blocks and entire functions. Code positioning is able to decrease the accumulated cache misses for a total of 18 real-life benchmarks by 15.5% on average for an automotive processor featuring a 2-way set-associative cache. These cache miss reductions translate to average WCET reductions by 6.1%. For direct-mapped caches, even larger savings of 18.8% (cache misses) and 9.0% (WCET) were achieved.