diff options
author | Kazu Hirata <kazu@google.com> | 2021-10-31 07:57:32 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-10-31 07:57:32 -0700 |
commit | c714da2ceb25c88099b852ff0181af183252f2fe (patch) | |
tree | 7caad5936b0f57a395934e4fb89c038a393bfca0 /llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp | |
parent | 1c2d3338eb8a280fc49eef143f502c5f44f72e4c (diff) | |
download | llvm-c714da2ceb25c88099b852ff0181af183252f2fe.zip llvm-c714da2ceb25c88099b852ff0181af183252f2fe.tar.gz llvm-c714da2ceb25c88099b852ff0181af183252f2fe.tar.bz2 |
[Transforms] Use {DenseSet,SetVector,SmallPtrSet}::contains (NFC)
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp index 440fc8e..497aac3 100644 --- a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp +++ b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp @@ -1553,11 +1553,11 @@ static bool negateICmpIfUsedByBranchOrSelectOnly(ICmpInst *ICmp, SI->swapValues(); SI->swapProfMetadata(); if (Scope->TrueBiasedSelects.count(SI)) { - assert(Scope->FalseBiasedSelects.count(SI) == 0 && + assert(!Scope->FalseBiasedSelects.contains(SI) && "Must not be already in"); Scope->FalseBiasedSelects.insert(SI); } else if (Scope->FalseBiasedSelects.count(SI)) { - assert(Scope->TrueBiasedSelects.count(SI) == 0 && + assert(!Scope->TrueBiasedSelects.contains(SI) && "Must not be already in"); Scope->TrueBiasedSelects.insert(SI); } @@ -1592,7 +1592,7 @@ static void insertTrivialPHIs(CHRScope *Scope, SmallVector<Instruction *, 8> Users; for (User *U : I.users()) { if (auto *UI = dyn_cast<Instruction>(U)) { - if (BlocksInScope.count(UI->getParent()) == 0 && + if (!BlocksInScope.contains(UI->getParent()) && // Unless there's already a phi for I at the exit block. !(isa<PHINode>(UI) && UI->getParent() == ExitBlock)) { CHR_DEBUG(dbgs() << "V " << I << "\n"); |