@@ -513,7 +513,7 @@ void RuntimePointerChecking::groupChecks(
513513 for (unsigned I = 0 ; I < Pointers.size (); ++I) {
514514 // We've seen this pointer before, and therefore already processed
515515 // its equivalence class.
516- if (Seen.count (I))
516+ if (Seen.contains (I))
517517 continue ;
518518
519519 MemoryDepChecker::MemAccessInfo Access (Pointers[I].PointerValue ,
@@ -1212,7 +1212,7 @@ bool AccessAnalysis::canCheckPtrAtRT(
12121212 SmallVector<MemAccessInfo, 4 > AccessInfos;
12131213 for (const Value *ConstPtr : ASPointers) {
12141214 Value *Ptr = const_cast <Value *>(ConstPtr);
1215- bool IsWrite = Accesses.count (MemAccessInfo (Ptr, true ));
1215+ bool IsWrite = Accesses.contains (MemAccessInfo (Ptr, true ));
12161216 if (IsWrite)
12171217 ++NumWritePtrChecks;
12181218 else
@@ -1341,9 +1341,10 @@ void AccessAnalysis::processMemAccesses() {
13411341 LLVM_DEBUG ({
13421342 for (const auto &[A, _] : Accesses)
13431343 dbgs () << " \t " << *A.getPointer () << " ("
1344- << (A.getInt () ? " write"
1345- : (ReadOnlyPtr.count (A.getPointer ()) ? " read-only"
1346- : " read" ))
1344+ << (A.getInt ()
1345+ ? " write"
1346+ : (ReadOnlyPtr.contains (A.getPointer ()) ? " read-only"
1347+ : " read" ))
13471348 << " )\n " ;
13481349 });
13491350
@@ -1387,13 +1388,13 @@ void AccessAnalysis::processMemAccesses() {
13871388
13881389 // If we're using the deferred access set, then it contains only
13891390 // reads.
1390- bool IsReadOnlyPtr = ReadOnlyPtr.count (Ptr) && !IsWrite;
1391+ bool IsReadOnlyPtr = ReadOnlyPtr.contains (Ptr) && !IsWrite;
13911392 if (UseDeferred && !IsReadOnlyPtr)
13921393 continue ;
13931394 // Otherwise, the pointer must be in the PtrAccessSet, either as a
13941395 // read or a write.
13951396 assert (((IsReadOnlyPtr && UseDeferred) || IsWrite ||
1396- S.count (MemAccessInfo (Ptr, false ))) &&
1397+ S.contains (MemAccessInfo (Ptr, false ))) &&
13971398 " Alias-set pointer not in the access set?" );
13981399
13991400 MemAccessInfo Access (Ptr, IsWrite);
@@ -2260,7 +2261,7 @@ bool MemoryDepChecker::areDepsSafe(const DepCandidates &AccessSets,
22602261 MinDepDistBytes = -1 ;
22612262 SmallPtrSet<MemAccessInfo, 8 > Visited;
22622263 for (MemAccessInfo CurAccess : CheckDeps) {
2263- if (Visited.count (CurAccess))
2264+ if (Visited.contains (CurAccess))
22642265 continue ;
22652266
22662267 // Check accesses within this set.
@@ -2605,7 +2606,7 @@ bool LoopAccessInfo::analyzeLoop(AAResults *AA, const LoopInfo *LI,
26052606
26062607 // See if there is an unsafe dependency between a load to a uniform address and
26072608 // store to the same uniform address.
2608- if (UniformStores.count (Ptr)) {
2609+ if (UniformStores.contains (Ptr)) {
26092610 LLVM_DEBUG (dbgs () << " LAA: Found an unsafe dependency between a uniform "
26102611 " load and uniform store to the same address!\n " );
26112612 HasLoadStoreDependenceInvolvingLoopInvariantAddress = true ;
0 commit comments