[llvm] 616f447 - Revert "[EquivalenceClasses] Replace findValue with contains (NFC)."
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 31 12:38:25 PDT 2025
Author: Florian Hahn
Date: 2025-03-31T20:38:12+01:00
New Revision: 616f447fc84bdc7655117f1b303d895dc3b93e4d
URL: https://github.com/llvm/llvm-project/commit/616f447fc84bdc7655117f1b303d895dc3b93e4d
DIFF: https://github.com/llvm/llvm-project/commit/616f447fc84bdc7655117f1b303d895dc3b93e4d.diff
LOG: Revert "[EquivalenceClasses] Replace findValue with contains (NFC)."
Breaks clang builds.
This reverts commit 8e390dedd71d0c2bcbe8775aee2e234ef7a5b787.
Added:
Modified:
llvm/include/llvm/ADT/EquivalenceClasses.h
llvm/lib/Analysis/LoopAccessAnalysis.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/EquivalenceClasses.h b/llvm/include/llvm/ADT/EquivalenceClasses.h
index f9c7819f18806..c375d6e77b12a 100644
--- a/llvm/include/llvm/ADT/EquivalenceClasses.h
+++ b/llvm/include/llvm/ADT/EquivalenceClasses.h
@@ -179,9 +179,10 @@ class EquivalenceClasses {
return member_iterator(nullptr);
}
- /// Returns true if \p V is contained an equivalence class.
- bool contains(const ElemTy &V) const {
- return TheMapping.find(V) != TheMapping.end();
+ /// findValue - Return an iterator to the specified value. If it does not
+ /// exist, end() is returned.
+ iterator findValue(const ElemTy &V) const {
+ return TheMapping.find(V);
}
/// getLeaderValue - Return the leader for the specified value that is in the
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 47ff31b9a0525..e7d6984caeba3 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -1230,7 +1230,7 @@ bool AccessAnalysis::canCheckPtrAtRT(
[this](const Value *Ptr) {
MemAccessInfo AccessWrite(const_cast<Value *>(Ptr),
true);
- return !DepCands.contains(AccessWrite);
+ return DepCands.findValue(AccessWrite) == DepCands.end();
})) &&
"Can only skip updating CanDoRT below, if all entries in AS "
"are reads or there is at most 1 entry");
More information about the llvm-commits
mailing list