Skip to content

Commit 616f447

Browse files
committed
Revert "[EquivalenceClasses] Replace findValue with contains (NFC)."
Breaks clang builds. This reverts commit 8e390de.
1 parent b01e5b2 commit 616f447

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

llvm/include/llvm/ADT/EquivalenceClasses.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,10 @@ class EquivalenceClasses {
179179
return member_iterator(nullptr);
180180
}
181181

182-
/// Returns true if \p V is contained an equivalence class.
183-
bool contains(const ElemTy &V) const {
184-
return TheMapping.find(V) != TheMapping.end();
182+
/// findValue - Return an iterator to the specified value. If it does not
183+
/// exist, end() is returned.
184+
iterator findValue(const ElemTy &V) const {
185+
return TheMapping.find(V);
185186
}
186187

187188
/// getLeaderValue - Return the leader for the specified value that is in the

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ bool AccessAnalysis::canCheckPtrAtRT(
12301230
[this](const Value *Ptr) {
12311231
MemAccessInfo AccessWrite(const_cast<Value *>(Ptr),
12321232
true);
1233-
return !DepCands.contains(AccessWrite);
1233+
return DepCands.findValue(AccessWrite) == DepCands.end();
12341234
})) &&
12351235
"Can only skip updating CanDoRT below, if all entries in AS "
12361236
"are reads or there is at most 1 entry");

0 commit comments

Comments
 (0)