[EquivalenceClasses] Replace findValue with contains (NFC).
Replace remaining use of findValue with more compact and limited contains().
This commit is contained in:
@@ -179,10 +179,9 @@ public:
|
||||
return member_iterator(nullptr);
|
||||
}
|
||||
|
||||
/// 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);
|
||||
/// Returns true if \p V is contained an equivalence class.
|
||||
bool contains(const ElemTy &V) const {
|
||||
return TheMapping.find(V) != TheMapping.end();
|
||||
}
|
||||
|
||||
/// getLeaderValue - Return the leader for the specified value that is in the
|
||||
|
||||
@@ -1230,7 +1230,7 @@ bool AccessAnalysis::canCheckPtrAtRT(
|
||||
[this](const Value *Ptr) {
|
||||
MemAccessInfo AccessWrite(const_cast<Value *>(Ptr),
|
||||
true);
|
||||
return DepCands.findValue(AccessWrite) == DepCands.end();
|
||||
return !DepCands.contains(AccessWrite);
|
||||
})) &&
|
||||
"Can only skip updating CanDoRT below, if all entries in AS "
|
||||
"are reads or there is at most 1 entry");
|
||||
|
||||
Reference in New Issue
Block a user