Replace uses of ImmutableSet in SymbolReaper with DenseSet.  This was
motivated from Shark profiles that shows that 'markLive' was very
heavy when using --analyzer-store=region.  On my benchmark file, this
reduces the analysis time for --analyzer-store=region from 19.5s to
13.5s and for --analyzer-store=basic from 5.3s to 3.5s.  For the
benchmark file, this is a reduction of about 30% analysis time for
both analysis modes (a huge win).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80765 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/SymbolManager.cpp b/lib/Analysis/SymbolManager.cpp
index b94551e..d2a82fd 100644
--- a/lib/Analysis/SymbolManager.cpp
+++ b/lib/Analysis/SymbolManager.cpp
@@ -191,20 +191,20 @@
 }
 
 void SymbolReaper::markLive(SymbolRef sym) {
-  TheLiving = F.Add(TheLiving, sym);
-  TheDead = F.Remove(TheDead, sym);
+  TheLiving.insert(sym);
+  TheDead.erase(sym);
 }
 
 bool SymbolReaper::maybeDead(SymbolRef sym) {
   if (isLive(sym))
     return false;
   
-  TheDead = F.Add(TheDead, sym);
+  TheDead.insert(sym);
   return true;
 }
 
 bool SymbolReaper::isLive(SymbolRef sym) {
-  if (TheLiving.contains(sym))
+  if (TheLiving.count(sym))
     return true;
   
   if (const SymbolDerived *derived = dyn_cast<SymbolDerived>(sym)) {