Lines Matching full:stride
124 cl::desc("Enable symbolic stride memory access versioning"));
139 "laa-speculate-unit-stride", cl::Hidden,
160 // symbolic stride replaced by one. in replaceSymbolicStrideSCEV()
163 // For a non-symbolic stride, just return the original expression. in replaceSymbolicStrideSCEV()
840 int64_t Stride = getPtrStride(PSE, AccessTy, Ptr, L, Strides).value_or(0); in isNoWrap() local
841 if (Stride == 1 || PSE.hasNoOverflow(Ptr, SCEVWrapPredicate::IncrementNUSW)) in isNoWrap()
1456 /// Check whether the access through \p Ptr has a constant stride.
1469 LLVM_DEBUG(dbgs() << "LAA: Bad stride - Scalable object: " << *AccessTy in getPtrStride()
1479 LLVM_DEBUG(dbgs() << "LAA: Bad stride - Not an AddRecExpr pointer " << *Ptr in getPtrStride()
1484 // The access function must stride over the innermost loop. in getPtrStride()
1486 LLVM_DEBUG(dbgs() << "LAA: Bad stride - Not striding over innermost loop " in getPtrStride()
1494 // Calculate the pointer stride and check if it is constant. in getPtrStride()
1497 LLVM_DEBUG(dbgs() << "LAA: Bad stride - Not a constant strided " << *Ptr in getPtrStride()
1514 int64_t Stride = StepVal / Size; in getPtrStride() local
1520 return Stride; in getPtrStride()
1525 return Stride; in getPtrStride()
1527 // An inbounds getelementptr that is a AddRec with a unit stride in getPtrStride()
1532 GEP && GEP->isInBounds() && (Stride == 1 || Stride == -1)) in getPtrStride()
1533 return Stride; in getPtrStride()
1540 (Stride == 1 || Stride == -1)) in getPtrStride()
1541 return Stride; in getPtrStride()
1549 return Stride; in getPtrStride()
1552 dbgs() << "LAA: Bad stride - Pointer may wrap in the address space " in getPtrStride()
1800 /// value of the maximum stride is given in \p MaxStride, and that have the same
1817 // where Step is the absolute stride of the memory accesses in bytes, in isSafeDependenceDistance()
1842 // The multiplication of the absolute stride in bytes and the in isSafeDependenceDistance()
1862 /// Check the dependence for two accesses with the same stride \p Stride.
1867 static bool areStridedAccessesIndependent(uint64_t Distance, uint64_t Stride, in areStridedAccessesIndependent() argument
1869 assert(Stride > 1 && "The stride must be greater than 1"); in areStridedAccessesIndependent()
1879 // No dependence if the scaled distance is not multiple of the stride. in areStridedAccessesIndependent()
1884 // Two accesses in memory (scaled distance is 2, stride is 4): in areStridedAccessesIndependent()
1892 // Two accesses in memory (scaled distance is 4, stride is 3): in areStridedAccessesIndependent()
1895 return ScaledDist % Stride; in areStridedAccessesIndependent()
1970 // not loop-invariant (stride will be 0 in that case), we cannot analyze the in getDependenceDistanceStrideAndSize()
1973 LLVM_DEBUG(dbgs() << "Pointer access with non-constant stride\n"); in getDependenceDistanceStrideAndSize()
1986 // Both Src and Sink have a constant stride, check if they are in the same in getDependenceDistanceStrideAndSize()
2010 // Get the dependence distance, stride, type size and what access writes for in isDependent()
2024 // TODO: Relax requirement that there is a common stride to retry with in isDependent()
2036 // stride multiplied by the symbolic maximum backedge taken count (which is an in isDependent()
2145 // front needs TypeByteSize * Stride. Vectorizing the last iteration needs in isDependent()
2155 // Two accesses in memory (stride is 2): in isDependent()
2849 /// Get the stride of a pointer access in a loop. Looks for symbolic
2850 /// strides "a[i*stride]". Returns the symbolic stride, or null otherwise.
2876 // If the pointer is invariant then there is no stride and it makes no in getStrideFromPointer()
2938 LLVM_DEBUG(dbgs() << " Ptr: " << *Ptr << " Stride: " << *StrideExpr << "\n"); in collectStridedAccess()
2941 LLVM_DEBUG(dbgs() << " Chose not to due to -laa-speculate-unit-stride\n"); in collectStridedAccess()
2945 // Avoid adding the "Stride == 1" predicate when we know that in collectStridedAccess()
2946 // Stride >= Trip-Count. Such a predicate will effectively optimize a single in collectStridedAccess()
2947 // or zero iteration loop, as Trip-Count <= Stride == 1. in collectStridedAccess()
2950 // beneficial to apply stride versioning. It might make more sense that the in collectStridedAccess()
2952 // their specific cost considerations; For example, in cases where stride in collectStridedAccess()
2955 // of various possible stride specializations, considering the alternatives in collectStridedAccess()
2960 // Match the types so we can compare the stride and the MaxBTC. in collectStridedAccess()
2961 // The Stride can be positive/negative, so we sign extend Stride; in collectStridedAccess()
2975 // "Stride >= TripCount" is equivalent to checking: in collectStridedAccess()
2976 // Stride - MaxBTC> 0 in collectStridedAccess()
2979 dbgs() << "LAA: Stride>=TripCount; No point in versioning as the " in collectStridedAccess()
2980 "Stride==1 predicate will imply that the loop executes " in collectStridedAccess()