@@ -589,11 +589,11 @@ void RuntimePointerChecking::groupChecks(
589589 // dependence. Not grouping the checks for a[i] and a[i + 9000] allows
590590 // us to perform an accurate check in this case.
591591 //
592- // The above case requires that we have an UnknownDependence between
593- // accesses to the same underlying object. This cannot happen unless
594- // FoundNonConstantDistanceDependence is set, and therefore UseDependencies
595- // is also false. In this case we will use the fallback path and create
596- // separate checking groups for all pointers.
592+ // In the above case, we have a non-constant distance and an Unknown
593+ // dependence between accesses to the same underlying object, and could retry
594+ // with runtime checks. Therefore UseDependencies is false. In this case we
595+ // will use the fallback path and create separate checking groups for all
596+ // pointers.
597597
598598 // If we don't have the dependency partitions, construct a new
599599 // checking pointer group for each pointer. This is also required
@@ -819,7 +819,7 @@ class AccessAnalysis {
819819 // / perform dependency checking.
820820 // /
821821 // / Note that this can later be cleared if we retry memcheck analysis without
822- // / dependency checking (i.e. FoundNonConstantDistanceDependence ).
822+ // / dependency checking (i.e. ShouldRetryWithRuntimeChecks ).
823823 bool isDependencyCheckNeeded () const { return !CheckDeps.empty (); }
824824
825825 // / We decided that no dependence analysis would be used. Reset the state.
@@ -896,7 +896,7 @@ class AccessAnalysis {
896896 // /
897897 // / Note that, this is different from isDependencyCheckNeeded. When we retry
898898 // / memcheck analysis without dependency checking
899- // / (i.e. FoundNonConstantDistanceDependence ), isDependencyCheckNeeded is
899+ // / (i.e. ShouldRetryWithRuntimeChecks ), isDependencyCheckNeeded is
900900 // / cleared while this remains set if we have potentially dependent accesses.
901901 bool IsRTCheckAnalysisNeeded = false ;
902902
@@ -2079,11 +2079,10 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
20792079 if (StrideAScaled == StrideBScaled)
20802080 CommonStride = StrideAScaled;
20812081
2082- // TODO: FoundNonConstantDistanceDependence is used as a necessary condition
2083- // to consider retrying with runtime checks. Historically, we did not set it
2084- // when (unscaled) strides were different but there is no inherent reason to.
2082+ // TODO: Historically, we didn't retry with runtime checks when (unscaled)
2083+ // strides were different but there is no inherent reason to.
20852084 if (!isa<SCEVConstant>(Dist))
2086- FoundNonConstantDistanceDependence |= StrideAPtrInt == StrideBPtrInt;
2085+ ShouldRetryWithRuntimeChecks |= StrideAPtrInt == StrideBPtrInt;
20872086
20882087 // If distance is a SCEVCouldNotCompute, return Unknown immediately.
20892088 if (isa<SCEVCouldNotCompute>(Dist)) {
@@ -2712,7 +2711,7 @@ bool LoopAccessInfo::analyzeLoop(AAResults *AA, const LoopInfo *LI,
27122711 DepsAreSafe =
27132712 DepChecker->areDepsSafe (DepCands, Accesses.getDependenciesToCheck ());
27142713
2715- if (!DepsAreSafe && DepChecker->shouldRetryWithRuntimeCheck ()) {
2714+ if (!DepsAreSafe && DepChecker->shouldRetryWithRuntimeChecks ()) {
27162715 LLVM_DEBUG (dbgs () << " LAA: Retrying with memory checks\n " );
27172716
27182717 // Clear the dependency checks. We assume they are not needed.
0 commit comments