Efficient procedure mapping using cache line coloring

Amir H. Hashemi, David R. Kaeli, Brad Calder
1997 Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation - PLDI '97  
As the gap between memory and processor performance continues to widen, it becomes increasingly important to exploit cache memory e ectively. Both hardware and software approaches can be explored to optimize cache performance. Hardware designers focus on cache organization issues, including replacement policy, associativity, line size and the resulting cache access time. Software writers use various optimization techniques, including software prefetching, data scheduling and code reordering.
more » ... focus is on improving memory usage through code reordering compiler techniques. In this paper we present a link-time procedure m a pping algorithm which can signi cantly improve the e ectiveness of the instruction cache. Our algorithm produces an improved p r ogram layout by performing a color mapping of procedures to cache lines, taking into consideration the procedure size, cache size, cache line size, and call graph. We use cache line coloring to guide the procedure mapping, indicating which cache lines to avoid when placing a procedure in the program layout. Our algorithm reduces on average the instruction cache miss rate by 40% over the original mapping and by 17% over the mapping algorithm of Pettis and Hansen 12].
doi:10.1145/258915.258931 dblp:conf/pldi/HashemiKC97 fatcat:qryi6setwbb5td3k7ryycsc4hu