ΒΆbool sortPtrAccesses(
ArrayRef<llvm::Value*> VL,
const llvm::DataLayout& DL,
llvm::ScalarEvolution& SE,
SmallVectorImpl<unsigned int>& SortedIndices)
bool sortPtrAccesses(
ArrayRef<llvm::Value*> VL,
const llvm::DataLayout& DL,
llvm::ScalarEvolution& SE,
SmallVectorImpl<unsigned int>& SortedIndices)
Description
Attempt to sort the pointers in \p VL and return the sorted indices in \p SortedIndices, if reordering is required. Returns 'true' if sorting is legal, otherwise returns 'false'. For example, for a given \p VL of memory accesses in program order, a[i+4], a[i+0], a[i+1] and a[i+7], this function will sort the \p VL and save the sorted indices in \p SortedIndices as a[i+0], a[i+1], a[i+4], a[i+7] and saves the mask for actual memory accesses in program order in\p SortedIndices as < 1,2,0,3>
Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:707
Parameters
- ArrayRef<llvm::Value*> VL
- const llvm::DataLayout& DL
- llvm::ScalarEvolution& SE
- SmallVectorImpl<unsigned int>& SortedIndices