[llvm-commits] [PATCH] [msan] Remove unreachable bb's

Benjamin Kramer benny.kra at gmail.com
Wed Dec 19 02:07:50 PST 2012



================
Comment at: lib/Transforms/Utils/Local.cpp:971
@@ +970,3 @@
+bool llvm::removeUnreachableBlocks(Function &F) {
+  SmallPtrSet<BasicBlock*, 128> Reachable;
+  SmallVector<BasicBlock*, 128> Worklist;
----------------
128 is really large, SmallPtrSet falls back to a linear search instead of hashing as long as the set is "small".

The sweet spot for SmallPtrSets is usually at about 8 or 16 small members.


http://llvm-reviews.chandlerc.com/D208



More information about the llvm-commits mailing list