LLVM: lib/Analysis/LoopCacheAnalysis.cpp File Reference (original) (raw)
This file defines the implementation for the loop cache analysis.
The implementation is largely based on the following paper:
Compiler Optimizations for Improving Data Locality By: Steve Carr, Katherine S. McKinley, Chau-Wen Tseng http://www.cs.utexas.edu/users/mckinley/papers/asplos-1994.pdf
The general approach taken to estimate the number of cache lines used by the memory references in an inner loop is:
- Partition memory references that exhibit temporal or spacial reuse into reference groups.
- For each loop L in the a loop nest LN: a. Compute the cost of the reference group b. Compute the loop cost by summing up the reference groups costs
Definition in file LoopCacheAnalysis.cpp.