[#llvm-CacheCost-2constructor] = xref:llvm.adoc[llvm]::xref:llvm/CacheCost.adoc[CacheCost]::CacheCost :relfileprefix: ../../ :mrdocs: Construct a CacheCost for the loop nest described by `Loops.` == Synopsis Declared in `<llvm/Analysis/LoopCacheAnalysis.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- CacheCost( xref:llvm/LoopVectorTy.adoc[LoopVectorTy] const& Loops, xref:llvm/LoopInfo.adoc[LoopInfo] const& LI, xref:llvm/ScalarEvolution.adoc[ScalarEvolution]& SE, xref:llvm/TargetTransformInfo.adoc[TargetTransformInfo]& TTI, xref:llvm/AAResults.adoc[AAResults]& AA, xref:llvm/DependenceInfo.adoc[DependenceInfo]& DI, std::optional<unsigned int> TRT = std::nullopt); ---- == Description The optional parameter `TRT` can be used to specify the max. distance between array elements accessed in a loop so that the elements are classified to have temporal reuse. == Parameters [cols="1,4"] |=== | Name| Description | *Loops* | Loops in the nest, collected in breadth‐first order. | *LI* | Loop info for the function. | *SE* | Scalar evolution analysis for subscript expressions. | *TTI* | Target transform info providing the cache line size. | *AA* | Alias analysis used when grouping references. | *DI* | Dependence information used when grouping references. | *TRT* | Optional max distance for classifying temporal reuse. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#