Informatics and computer science
The complexity of scheduling for data cache optimization

https://doi.org/10.1016/S0020-0255(96)00273-3Get rights and content

Abstract

The performance of the memory hierarchy, and in particular the data cache, can significantly impact program execution speed. Thus, instruction reordering to minimize data cache misses is an important consideration for optimizing compilers. In this paper, we prove that the problem of instruction reordering for data cache miss minimization belongs to the class of NP-complete problems. The framework that we develop for the proof exposes the symbiotic relationship among the references to the cache. This symbiosis exists because a single cache reference lengthens the life span of its neighbors in the cache, and thus provides opportunity for additional cache hits through reference to the neighbors. We present a greedy heuristic designed to exploit this symbiotic relationship to improve data cache performance for general-purpose programs. Experiments with a prototype implementation of the heuristic show that we can improve data cache performance in many cases.

References (17)

  • D. Gannon et al.

    Strategies for cache and local memory management by global program transformation

    J. Parallel and Distributed Computing

    (1988)
  • A.V. Aho et al.

    Compilers, Principles, Techniques, and Tools

    (1986)
  • M.R. Garey et al.

    Computer and Intractability: A Guide to the Theory of NP-Completeness

    (1979)
  • R. Gupta

    Employing register channels for the exploitation of instruction level parallelism

  • Y.-J. Ju et al.

    Reduction of cache coherence overhead by compiler data layout and loop transformation

  • B.A. Malloy et al.

    Scheduling dags for asynchronous multiprocessor execution

    IEEE Trans. Parallel and Distributed Computing

    (1994)
  • S. McFarling

    Program optimization for instruction caches

There are more references available in the full text version of this article.

Cited by (4)

View full text