@@ -2025,16 +2025,16 @@ getDependenceDistanceStrideAndSize(
2025
2025
2026
2026
MemoryDepChecker::Dependence::DepType MemoryDepChecker::isDependent (
2027
2027
const MemAccessInfo &A, unsigned AIdx, const MemAccessInfo &B,
2028
- unsigned BIdx, const DenseMap<Value *, const SCEV *> &Strides,
2028
+ unsigned BIdx,
2029
2029
const DenseMap<Value *, SmallVector<const Value *, 16 >>
2030
2030
&UnderlyingObjects) {
2031
2031
assert (AIdx < BIdx && " Must pass arguments in program order" );
2032
2032
2033
2033
// Get the dependence distance, stride, type size and what access writes for
2034
2034
// the dependence between A and B.
2035
2035
auto Res = getDependenceDistanceStrideAndSize (
2036
- A, InstMap[AIdx], B, InstMap[BIdx], Strides , UnderlyingObjects, PSE ,
2037
- InnermostLoop);
2036
+ A, InstMap[AIdx], B, InstMap[BIdx], SymbolicStrides , UnderlyingObjects,
2037
+ PSE, InnermostLoop);
2038
2038
if (std::holds_alternative<Dependence::DepType>(Res))
2039
2039
return std::get<Dependence::DepType>(Res);
2040
2040
@@ -2269,7 +2269,6 @@ MemoryDepChecker::Dependence::DepType MemoryDepChecker::isDependent(
2269
2269
2270
2270
bool MemoryDepChecker::areDepsSafe (
2271
2271
DepCandidates &AccessSets, MemAccessInfoList &CheckDeps,
2272
- const DenseMap<Value *, const SCEV *> &Strides,
2273
2272
const DenseMap<Value *, SmallVector<const Value *, 16 >>
2274
2273
&UnderlyingObjects) {
2275
2274
@@ -2314,9 +2313,8 @@ bool MemoryDepChecker::areDepsSafe(
2314
2313
if (*I1 > *I2)
2315
2314
std::swap (A, B);
2316
2315
2317
- Dependence::DepType Type =
2318
- isDependent (*A.first , A.second , *B.first , B.second , Strides,
2319
- UnderlyingObjects);
2316
+ Dependence::DepType Type = isDependent (*A.first , A.second , *B.first ,
2317
+ B.second , UnderlyingObjects);
2320
2318
mergeInStatus (Dependence::isSafeForVectorization (Type));
2321
2319
2322
2320
// Gather dependences unless we accumulated MaxDependences
@@ -2674,9 +2672,9 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI,
2674
2672
CanVecMem = true ;
2675
2673
if (Accesses.isDependencyCheckNeeded ()) {
2676
2674
LLVM_DEBUG (dbgs () << " LAA: Checking memory dependencies\n " );
2677
- CanVecMem = DepChecker->areDepsSafe (
2678
- DependentAccesses, Accesses.getDependenciesToCheck (), SymbolicStrides ,
2679
- Accesses.getUnderlyingObjects ());
2675
+ CanVecMem = DepChecker->areDepsSafe (DependentAccesses,
2676
+ Accesses.getDependenciesToCheck (),
2677
+ Accesses.getUnderlyingObjects ());
2680
2678
2681
2679
if (!CanVecMem && DepChecker->shouldRetryWithRuntimeCheck ()) {
2682
2680
LLVM_DEBUG (dbgs () << " LAA: Retrying with memory checks\n " );
@@ -3066,8 +3064,8 @@ LoopAccessInfo::LoopAccessInfo(Loop *L, ScalarEvolution *SE,
3066
3064
if (ScalableWidth.isNonZero ())
3067
3065
MaxTargetVectorWidthInBits = std::numeric_limits<unsigned >::max ();
3068
3066
}
3069
- DepChecker =
3070
- std::make_unique<MemoryDepChecker>(*PSE, L, MaxTargetVectorWidthInBits);
3067
+ DepChecker = std::make_unique<MemoryDepChecker>(*PSE, L, SymbolicStrides,
3068
+ MaxTargetVectorWidthInBits);
3071
3069
PtrRtChecking = std::make_unique<RuntimePointerChecking>(*DepChecker, SE);
3072
3070
if (canAnalyzeLoop ())
3073
3071
analyzeLoop (AA, LI, TLI, DT);
0 commit comments