Compiler-based prefetching for recursive data structures
- 1 September 1996
- proceedings article
- Published by Association for Computing Machinery (ACM)
- Vol. 30 (5) , 222-233
- https://doi.org/10.1145/237090.237190
Abstract
Software-controlled data prefetching offers the potential for bridging the ever-increasing speed gap between the memory subsystem and today's high-performance processors. While prefetching has enjoyed considerable success in array-based numeric codes, its potential in pointer-based applications has remained largely unexplored. This paper investigates compiler-based prefetching for pointer-based applications---in particular, those containing recursive data structures. We identify the fundamental problem in prefetching pointer-based data structures and propose a guideline for devising successful prefetching schemes. Based on this guideline, we design three prefetching schemes, we automate the most widely applicable scheme (greedy prefetching) in an optimizing research compiler, and we evaluate the performance of all three schemes on a modern superscalar processor similar to the MIPS R10000. Our results demonstrate that compiler-inserted prefetching can significantly improve the execution speed of pointer-based codes---as much as 45% for the applications we study. In addition, the more sophisticated algorithms (which we currently perform by hand, but which might be implemented in future compilers) can improve performance by as much as twofold. Compared with the only other compiler-based pointer prefetching scheme in the literature, our algorithms offer substantially better performance by avoiding unnecessary overhead and hiding more latency.Keywords
This publication has 16 references indexed in Scilit:
- Is it a tree, a DAG, or a cyclic graph? A shape analysis for heap-directed pointers in CPublished by Association for Computing Machinery (ACM) ,1996
- InterleavingPublished by Association for Computing Machinery (ACM) ,1994
- Compiler optimizations for improving data localityPublished by Association for Computing Machinery (ACM) ,1994
- A general data dependence test for dynamic, pointer-based data structuresPublished by Association for Computing Machinery (ACM) ,1994
- Context-sensitive interprocedural points-to analysis in the presence of function pointersPublished by Association for Computing Machinery (ACM) ,1994
- Interprocedural modification side effect analysis with pointer aliasingPublished by Association for Computing Machinery (ACM) ,1993
- Sharlit---a tool for building optimizersPublished by Association for Computing Machinery (ACM) ,1992
- An effective on-chip preloading scheme to reduce data access penaltyPublished by Association for Computing Machinery (ACM) ,1991
- A data locality optimizing algorithmPublished by Association for Computing Machinery (ACM) ,1991
- APRILPublished by Association for Computing Machinery (ACM) ,1990