@@ -589,11 +589,11 @@ void RuntimePointerChecking::groupChecks(
589
589
// dependence. Not grouping the checks for a[i] and a[i + 9000] allows
590
590
// us to perform an accurate check in this case.
591
591
//
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.
597
597
598
598
// If we don't have the dependency partitions, construct a new
599
599
// checking pointer group for each pointer. This is also required
@@ -819,7 +819,7 @@ class AccessAnalysis {
819
819
// / perform dependency checking.
820
820
// /
821
821
// / 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 ).
823
823
bool isDependencyCheckNeeded () const { return !CheckDeps.empty (); }
824
824
825
825
// / We decided that no dependence analysis would be used. Reset the state.
@@ -896,7 +896,7 @@ class AccessAnalysis {
896
896
// /
897
897
// / Note that, this is different from isDependencyCheckNeeded. When we retry
898
898
// / memcheck analysis without dependency checking
899
- // / (i.e. FoundNonConstantDistanceDependence ), isDependencyCheckNeeded is
899
+ // / (i.e. ShouldRetryWithRuntimeChecks ), isDependencyCheckNeeded is
900
900
// / cleared while this remains set if we have potentially dependent accesses.
901
901
bool IsRTCheckAnalysisNeeded = false ;
902
902
@@ -2079,11 +2079,10 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
2079
2079
if (StrideAScaled == StrideBScaled)
2080
2080
CommonStride = StrideAScaled;
2081
2081
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.
2085
2084
if (!isa<SCEVConstant>(Dist))
2086
- FoundNonConstantDistanceDependence |= StrideAPtrInt == StrideBPtrInt;
2085
+ ShouldRetryWithRuntimeChecks |= StrideAPtrInt == StrideBPtrInt;
2087
2086
2088
2087
// If distance is a SCEVCouldNotCompute, return Unknown immediately.
2089
2088
if (isa<SCEVCouldNotCompute>(Dist)) {
@@ -2712,7 +2711,7 @@ bool LoopAccessInfo::analyzeLoop(AAResults *AA, const LoopInfo *LI,
2712
2711
DepsAreSafe =
2713
2712
DepChecker->areDepsSafe (DepCands, Accesses.getDependenciesToCheck ());
2714
2713
2715
- if (!DepsAreSafe && DepChecker->shouldRetryWithRuntimeCheck ()) {
2714
+ if (!DepsAreSafe && DepChecker->shouldRetryWithRuntimeChecks ()) {
2716
2715
LLVM_DEBUG (dbgs () << " LAA: Retrying with memory checks\n " );
2717
2716
2718
2717
// Clear the dependency checks. We assume they are not needed.
0 commit comments