LLVM 24.0.0git
llvm::slpvectorizer::SLPAnalysisCache Class Reference

Caches the results of the expensive analyses that are queried repeatedly for the same values while the vectorization trees are built and their costs are estimated. More...

#include "Transforms/Vectorize/SLPVectorizer/SLPMemoryUtils.h"

Public Member Functions

std::optional< int64_t > getPointersDiff (Type *ElemTyA, Value *PtrA, Type *ElemTyB, Value *PtrB, const DataLayout &DL, ScalarEvolution &SE, bool StrictCheck=false, bool CheckType=true)
 Cached llvm::getPointersDiff(), a miss may require SCEV analysis.
bool isGuaranteedNotToBePoison (const Value *V, AssumptionCache *AC)
 Cached llvm::isGuaranteedNotToBePoison().
void clear ()

Detailed Description

Caches the results of the expensive analyses that are queried repeatedly for the same values while the vectorization trees are built and their costs are estimated.

The results may change once the vectorized code is emitted and the scalars are erased, so the cache is cleared after each successful vectorizeTree().

Definition at line 50 of file SLPMemoryUtils.h.

Member Function Documentation

◆ clear()

void llvm::slpvectorizer::SLPAnalysisCache::clear ( )
inline

Definition at line 63 of file SLPMemoryUtils.h.

◆ getPointersDiff()

std::optional< int64_t > llvm::slpvectorizer::SLPAnalysisCache::getPointersDiff ( Type * ElemTyA,
Value * PtrA,
Type * ElemTyB,
Value * PtrB,
const DataLayout & DL,
ScalarEvolution & SE,
bool StrictCheck = false,
bool CheckType = true )

Cached llvm::getPointersDiff(), a miss may require SCEV analysis.

The result for (PtrA, PtrB) also serves the query for the swapped pointers.

Definition at line 199 of file SLPMemoryUtils.cpp.

References DL, llvm::getPointersDiff(), and llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key.

◆ isGuaranteedNotToBePoison()

bool llvm::slpvectorizer::SLPAnalysisCache::isGuaranteedNotToBePoison ( const Value * V,
AssumptionCache * AC )

The documentation for this class was generated from the following files: