aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/SymbolManager.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-09-02 06:03:18 +0000
committerTed Kremenek <kremenek@apple.com>2009-09-02 06:03:18 +0000
commita97d54c165ca6b6e57b9f333059a84c2188dd591 (patch)
treed4b58a2a9df44926d42a69f52a43c174b050e0a9 /lib/Analysis/SymbolManager.cpp
parent2465047c6f5b9a865f63ae1402fccb95abab9e28 (diff)
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
Diffstat (limited to 'lib/Analysis/SymbolManager.cpp')
-rw-r--r--lib/Analysis/SymbolManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/SymbolManager.cpp b/lib/Analysis/SymbolManager.cpp
index b94551e31f..d2a82fd1fc 100644
--- a/lib/Analysis/SymbolManager.cpp
+++ b/lib/Analysis/SymbolManager.cpp
@@ -191,20 +191,20 @@ bool SymbolManager::canSymbolicate(QualType T) {
}
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)) {