|
LLVM 24.0.0git
|
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 | sortPtrAccesses (ArrayRef< Value * > VL, Type *ElemTy, const DataLayout &DL, ScalarEvolution &SE, SmallVectorImpl< unsigned > &SortedIndices) |
| llvm::sortPtrAccesses() with the cached pointer distances. | |
| bool | isGuaranteedNotToBePoison (const Value *V, AssumptionCache *AC) |
| Cached llvm::isGuaranteedNotToBePoison(). | |
| void | clear () |
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 new code replaces the scalars, so the cache is cleared each time the replaced scalars are erased.
Definition at line 49 of file SLPMemoryUtils.h.
|
inline |
Definition at line 67 of file SLPMemoryUtils.h.
| 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.
Referenced by sortPtrAccesses().
| bool llvm::slpvectorizer::SLPAnalysisCache::isGuaranteedNotToBePoison | ( | const Value * | V, |
| AssumptionCache * | AC ) |
Cached llvm::isGuaranteedNotToBePoison().
Definition at line 252 of file SLPMemoryUtils.cpp.
References llvm::isGuaranteedNotToBePoison().
| bool llvm::slpvectorizer::SLPAnalysisCache::sortPtrAccesses | ( | ArrayRef< Value * > | VL, |
| Type * | ElemTy, | ||
| const DataLayout & | DL, | ||
| ScalarEvolution & | SE, | ||
| SmallVectorImpl< unsigned > & | SortedIndices ) |
llvm::sortPtrAccesses() with the cached pointer distances.
Definition at line 224 of file SLPMemoryUtils.cpp.
References llvm::SmallVectorImpl< T >::clear(), DL, llvm::drop_begin(), llvm::enumerate(), llvm::ArrayRef< T >::front(), getPointersDiff(), llvm::Off, llvm::SmallVectorImpl< T >::resize(), and llvm::ArrayRef< T >::size().