summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-05-04 04:30:18 +0000
committerTed Kremenek <kremenek@apple.com>2009-05-04 04:30:18 +0000
commit1bff64e309ba112249f59d9542ee5f7e5080f4fa (patch)
tree9dfc91698dca726bfcc341debadae62a0c301d0e
parent33955dd28fadd4f259f95bdf7e807d285e05783e (diff)
downloadbcm5719-llvm-1bff64e309ba112249f59d9542ee5f7e5080f4fa.tar.gz
bcm5719-llvm-1bff64e309ba112249f59d9542ee5f7e5080f4fa.zip
retain checker: Don't bother using a FoldingSet to unique summaries.
We never compare summaries by their pointers, and we create only a handful of them when analyzing a given function. llvm-svn: 70824
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index 58f581aff83..505ec7d11d1 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/lib/Analysis/CFRefCount.cpp
@@ -530,9 +530,6 @@ class VISIBILITY_HIDDEN RetainSummaryManager {
// Typedefs.
//==-----------------------------------------------------------------==//
- typedef llvm::FoldingSet<RetainSummary>
- SummarySetTy;
-
typedef llvm::DenseMap<FunctionDecl*, RetainSummary*>
FuncSummariesTy;
@@ -551,10 +548,7 @@ class VISIBILITY_HIDDEN RetainSummaryManager {
/// GCEnabled - Records whether or not the analyzed code runs in GC mode.
const bool GCEnabled;
-
- /// SummarySet - A FoldingSet of uniqued summaries.
- SummarySetTy SummarySet;
-
+
/// FuncSummaries - A map from FunctionDecls to summaries.
FuncSummariesTy FuncSummaries;
@@ -782,25 +776,10 @@ RetainSummary*
RetainSummaryManager::getPersistentSummary(ArgEffects AE, RetEffect RetEff,
ArgEffect ReceiverEff,
ArgEffect DefaultEff,
- bool isEndPath) {
-
- // Generate a profile for the summary.
- llvm::FoldingSetNodeID profile;
- RetainSummary::Profile(profile, AE, RetEff, DefaultEff, ReceiverEff,
- isEndPath);
-
- // Look up the uniqued summary, or create one if it doesn't exist.
- void* InsertPos;
- RetainSummary* Summ = SummarySet.FindNodeOrInsertPos(profile, InsertPos);
-
- if (Summ)
- return Summ;
-
+ bool isEndPath) {
// Create the summary and return it.
- Summ = (RetainSummary*) BPAlloc.Allocate<RetainSummary>();
+ RetainSummary *Summ = (RetainSummary*) BPAlloc.Allocate<RetainSummary>();
new (Summ) RetainSummary(AE, RetEff, DefaultEff, ReceiverEff, isEndPath);
- SummarySet.InsertNode(Summ, InsertPos);
-
return Summ;
}
OpenPOWER on IntegriCloud