Relying on the find method implies a roundtrip to the iterator world, which is not costless because iterator creation involves a few check to ensure the iterator is in a valid position (through the SmallPtrSetIteratorImpl::AdvanceIfNotValid method). It turns out that the result of SmallPtrSetImpl::find_imp is either valid or the EndPointer, so there's no need to go through that abstraction, and the compiler cannot guess it.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo