[llvm-commits] [llvm] r41074 - /llvm/trunk/include/llvm/Analysis/Dominators.h

Nick Lewycky nicholas at mxc.ca
Tue Aug 14 18:27:39 PDT 2007


On Tue, 2007-08-14 at 16:53 +0000, Devang Patel wrote:
> +    for (iterator I = begin(), E = end(); I != E; ++I)
> +      if (I->second.count(BB))
> +        I->second.erase(BB);
> +    Frontiers.erase(BB);
>    }

Why test I->second.count()? The worst erase() will do if BB doesn't
exist is nothing. Just call erase() and it will cut the number of
lookups in half.

Nick





More information about the llvm-commits mailing list