llvm::IndexedReference

A memory reference as a base pointer and a set of indexing operations.

Synopsis

Declared in <llvm/Analysis/LoopCacheAnalysis.h>

class IndexedReference;

Description

Represents a memory reference as a base pointer and a set of indexing operations. For example given the array reference A[i][2j+1][3k+2]in a 3-dim loop nest: for(i=0;i<n;++i) for(j=0;j<m;++j) for(k=0;k<o;++k) ... A[i][2j+1][3k+2]... We expect: BasePointer -> A Subscripts -> [{0,+,1}<%for.i>][{1,+,2}<%for.j>][{2,+,3}<%for.k>] Sizes -> [m][o][4]

Member Functions

NameDescription
IndexedReference [constructor]Construct an indexed reference given a StoreOrLoadInst instruction.
computeRefCost Compute the cache cost of this reference with loop L innermost.
getBasePointer Return the base pointer of this memory reference.
getFirstSubscript Return the first (outermost) subscript.
getLastSubscript Return the last (innermost) subscript.
getNumSubscripts Return the number of indexing subscripts.
getSubscript Return the subscript at zero-based index SubNum.
hasSpacialReuse Check whether this reference and Other share a cache line of size CLS.
hasTemporalReuse Check whether this reference and Other have temporal reuse in L.
isValid Return true if this reference was successfully delinearized.

Friends

NameDescription
llvm::operator<<Write indexed reference R to stream OS.