We have developed a compiler algorithm that selectively prefetches only those references that are likely to suffer cache misses [62]. Our algorithm consists of the following three major steps:
The first step in our algorithm comprises the analysis phase, thus answering the question of what we should prefetch. The details of this locality analysis algorithm are presented in Section . The second and third steps constitute the scheduling phase of our algorithm, and are described in Section . We will tie all of these components together in Section by showing the code generated for a running example that is introduced in Section and used throughout the remainder of this chapter.