Estimated cache‐line cost of loops in a nest.
Synopsis
Declared in <llvm/Analysis/LoopCacheAnalysis.h>
class CacheCost;
Description
CacheCost represents the estimated cost of a inner loop as the number of cache lines used by the memory references it contains. The 'cache cost' of a loop 'L' in a loop nest 'LN' is computed as the sum of the cache costs of all of its reference groups when the loop is considered to be in the innermost position in the nest. A reference group represents memory references that fall into the same cache line. Each reference group is analysed with respect to the innermost loop in a loop nest. The cost of a reference is defined as follow:
-
one if it is loop invariant w.r.t the innermost loop,
-
equal to the loop trip count divided by the cache line times the reference stride if the reference stride is less than the cache line size (CLS), and the coefficient of this loop's index variable used in all other subscripts is zero (e.g. RefCost = TripCount/(CLS/RefStride))
-
equal to the innermost loop trip count if the reference stride is greater or equal to the cache line size CLS.
Member Functions
Name |
Description |
|
Construct a CacheCost for the loop nest described by |
Return the estimated cost of loop |
|
Return the estimated ordered loop costs. |
Static Member Functions
Name |
Description |
Create a CacheCost for the loop nest rooted by |
Friends
Name |
Description |
Write cache cost |
Created with MrDocs