Method and apparatus for selecting references for prefetching in an optimizing compiler
Abstract
One embodiment of the present invention provides a system that generates code to perform anticipatory prefetching for data references. During operation, the system receives code to be executed on a computer system. Next, the system analyzes the code to identify data references to be prefetched. This analysis can involve: using a two-phase marking process in which blocks that are certain to execute are considered before other blocks; and analyzing complex array subscripts. Next, the system inserts prefetch instructions into the code in advance of the identified data references. This insertion can involve: dealing with non-constant or unknown stride values; moving prefetch instructions into preceding basic blocks; and issuing multiple prefetches for the same data reference.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 19 · Forward citations: 13.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method for generating code to perform anticipatory prefetching for data references, comprising: receiving code to be executed on a computer system; analyzing the code to identify data references to be prefetched, wherein the data references are identified from basic blocks within if conditions regardless of whether the basic blocks are likely to execute, and wherein analyzing the code involves, performing a first marking phase in which only data references located in blocks that are certain to execute are considered in determining which data references are covered by preceding data reference
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (13 of 13 total)
References Cited — Backward Prior Art (19)
Non-Patent Literature (1)
- Publication entitled "Design and Evaluation of a Compiler Algorithm for Prefetching", by Todd C. Mowry et al., ACM Sigplan Notices, Sep. 1992, No. 9, XP000330590, pp. 62-73.