[Transforms] Use is_contained (NFC)

This commit is contained in:
Kazu Hirata 2020-12-12 09:37:49 -08:00
parent 2cf5310471
commit 215c1b1935
3 changed files with 3 additions and 3 deletions

View File

@ -283,7 +283,7 @@ static int getOutliningPenalty(ArrayRef<BasicBlock *> Region,
}
for (BasicBlock *SuccBB : successors(BB)) {
if (find(Region, SuccBB) == Region.end()) {
if (!is_contained(Region, SuccBB)) {
NoBlocksReturn = false;
SuccsOutsideRegion.insert(SuccBB);
}

View File

@ -906,7 +906,7 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
// Note that after this point, it is an error to do anything other
// than use the callee's address or delete it.
Callee.dropAllReferences();
assert(find(DeadFunctions, &Callee) == DeadFunctions.end() &&
assert(!is_contained(DeadFunctions, &Callee) &&
"Cannot put cause a function to become dead twice!");
DeadFunctions.push_back(&Callee);
CalleeWasDeleted = true;

View File

@ -260,7 +260,7 @@ class VPDef {
void removeDefinedValue(VPValue *V) {
assert(V->getDef() == this &&
"can only remove VPValue linked with this VPDef");
assert(find(DefinedValues, V) != DefinedValues.end() &&
assert(is_contained(DefinedValues, V) &&
"VPValue to remove must be in DefinedValues");
erase_value(DefinedValues, V);
V->Def = nullptr;