Home | History | Annotate | Download | only in Analysis

Lines Matching full:distance

955 bool MemoryDepChecker::couldPreventStoreLoadForward(unsigned Distance,
957 // If loads occur at a distance that is not a multiple of a feasible vector
965 // Store-load forwarding distance.
975 if (Distance % vf && Distance / vf < NumCyclesForStoreLoadThroughMemory) {
982 DEBUG(dbgs() << "LAA: Distance " << Distance <<
995 /// \p Distance is the positive distance and \p TypeByteSize is type size in
999 static bool areStridedAccessesIndependent(unsigned Distance, unsigned Stride,
1003 assert(Distance > 0 && "The distance must be non-zero");
1005 // Skip if the distance is not multiple of type byte size.
1006 if (Distance % TypeByteSize)
1009 unsigned ScaledDist = Distance / TypeByteSize;
1011 // No dependence if the scaled distance is not multiple of the stride.
1016 // Two accesses in memory (scaled distance is 2, stride is 4):
1024 // Two accesses in memory (scaled distance is 4, stride is 3):
1075 DEBUG(dbgs() << "LAA: Distance for " << *InstMap[AIdx] << " to "
1088 DEBUG(dbgs() << "LAA: Dependence because of non-constant distance\n");
1128 unsigned Distance = (unsigned) Val.getZExtValue();
1132 areStridedAccessesIndependent(Distance, Stride, TypeByteSize)) {
1145 // It's not vectorizable if the distance is smaller than the minimum distance
1148 // TypeByteSize (No need to plus the last gap distance).
1161 // Distance needs for vectorizing iterations except the last iteration:
1162 // 4 * 2 * (MinNumIter - 1). Distance needs for the last iteration: 4.
1163 // So the minimum distance needed is: 4 * 2 * (MinNumIter - 1) + 4.
1165 // If MinNumIter is 2, it is vectorizable as the minimum distance needed is
1166 // 12, which is less than distance.
1169 // the minimum distance needed is 28, which is greater than distance. It is
1173 if (MinDistanceNeeded > Distance) {
1174 DEBUG(dbgs() << "LAA: Failure because of positive distance " << Distance
1179 // Unsafe if the minimum distance needed is greater than max safe distance.
1186 // Positive distance bigger than max vectorization factor.
1187 // FIXME: Should use max factor instead of max distance in bytes, which could
1197 // This case is currently unsafe according to the max safe distance. If we
1198 // analyze the two accesses on array B, the max safe dependence distance
1199 // is 2. Then we analyze the accesses on array A, the minimum distance needed
1203 Distance < MaxSafeDepDistBytes ? Distance : MaxSafeDepDistBytes;
1207 couldPreventStoreLoadForward(Distance, TypeByteSize))
1210 DEBUG(dbgs() << "LAA: Positive distance " << Val.getSExtValue()