[llvm-commits] [llvm] r172368 - in /llvm/trunk: lib/Transforms/Scalar/ObjCARC.cpp test/Transforms/ObjCARC/dont-infinite-loop-during-block-escape-analysis.ll

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Jan 14 10:07:39 PST 2013


On Jan 13, 2013, at 2:12 PM, Michael Gottesman <mgottesman at apple.com> wrote:

> +          if (!VisitedSet.count(UUser)) {
> +            DEBUG(dbgs() << "DoesObjCBlockEscape: User copies value. Escapes if "
> +                            "result escapes. Adding to list.\n");
> +            VisitedSet.insert(V);
> +            Worklist.push_back(UUser);
> +          } else {

SmallPtrSet::insert() returns a bool you can use to avoid two hash lookups.

/jakob




More information about the llvm-commits mailing list