Skip to content

Commit a3fb54c

Browse files
authored
[LAA][NFC] Unify naming of DepCandidates to DepCands (#139534)
The MemoryDepChecker::DepCandidates instance in each LoopAccessInfo had multiple names (AccessSets, DepCands, DependentAccesses), which was confusing. This patch renames all references to DepCands for consistency.
1 parent 5c7bc6a commit a3fb54c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,7 +2249,7 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
22492249
return Dependence::BackwardVectorizable;
22502250
}
22512251

2252-
bool MemoryDepChecker::areDepsSafe(const DepCandidates &AccessSets,
2252+
bool MemoryDepChecker::areDepsSafe(const DepCandidates &DepCands,
22532253
const MemAccessInfoList &CheckDeps) {
22542254

22552255
MinDepDistBytes = -1;
@@ -2260,9 +2260,9 @@ bool MemoryDepChecker::areDepsSafe(const DepCandidates &AccessSets,
22602260

22612261
// Check accesses within this set.
22622262
EquivalenceClasses<MemAccessInfo>::member_iterator AI =
2263-
AccessSets.findLeader(CurAccess);
2263+
DepCands.findLeader(CurAccess);
22642264
EquivalenceClasses<MemAccessInfo>::member_iterator AE =
2265-
AccessSets.member_end();
2265+
DepCands.member_end();
22662266

22672267
// Check every access pair.
22682268
while (AI != AE) {
@@ -2527,9 +2527,8 @@ bool LoopAccessInfo::analyzeLoop(AAResults *AA, const LoopInfo *LI,
25272527
return true;
25282528
}
25292529

2530-
MemoryDepChecker::DepCandidates DependentAccesses;
2531-
AccessAnalysis Accesses(TheLoop, AA, LI, DependentAccesses, *PSE,
2532-
LoopAliasScopes);
2530+
MemoryDepChecker::DepCandidates DepCands;
2531+
AccessAnalysis Accesses(TheLoop, AA, LI, DepCands, *PSE, LoopAliasScopes);
25332532

25342533
// Holds the analyzed pointers. We don't want to call getUnderlyingObjects
25352534
// multiple times on the same object. If the ptr is accessed twice, once
@@ -2651,8 +2650,8 @@ bool LoopAccessInfo::analyzeLoop(AAResults *AA, const LoopInfo *LI,
26512650
bool DepsAreSafe = true;
26522651
if (Accesses.isDependencyCheckNeeded()) {
26532652
LLVM_DEBUG(dbgs() << "LAA: Checking memory dependencies\n");
2654-
DepsAreSafe = DepChecker->areDepsSafe(DependentAccesses,
2655-
Accesses.getDependenciesToCheck());
2653+
DepsAreSafe =
2654+
DepChecker->areDepsSafe(DepCands, Accesses.getDependenciesToCheck());
26562655

26572656
if (!DepsAreSafe && DepChecker->shouldRetryWithRuntimeCheck()) {
26582657
LLVM_DEBUG(dbgs() << "LAA: Retrying with memory checks\n");

0 commit comments

Comments
 (0)