summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-09-03 04:21:34 +0000
committerTed Kremenek <kremenek@apple.com>2009-09-03 04:21:34 +0000
commit231dd7169dd24f87e6e460d1c4b6681e040fb23d (patch)
treed4805828c4f7532597375548430aa1954fd66518
parent11c989cc4727ad975fda0d7efc0e69f2ebd00a32 (diff)
downloadbcm5719-llvm-231dd7169dd24f87e6e460d1c4b6681e040fb23d.tar.gz
bcm5719-llvm-231dd7169dd24f87e6e460d1c4b6681e040fb23d.zip
Set the 'cached digest' flag after computing the digest for an
ImutAVLTree. This was accidentally left out, and essentially caused digest caching to be ignored in ImmutableMap and ImmutableSet (this bug was detected from shark traces that showed ComputeDigest was in the hot path in the clang static analyzer). This reduces the running time of the clang static analyzer on an example benchmark by ~32% for both RegionStore (field-sensitivty) and BasicStore (without field-sensitivity). llvm-svn: 80877
-rw-r--r--llvm/include/llvm/ADT/ImmutableSet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h
index 7c070d7a7f2..70fc1a69145 100644
--- a/llvm/include/llvm/ADT/ImmutableSet.h
+++ b/llvm/include/llvm/ADT/ImmutableSet.h
@@ -331,6 +331,7 @@ private:
uint32_t X = ComputeDigest(getLeft(), getRight(), getValue());
Digest = X;
+ MarkedCachedDigest();
return X;
}
};
OpenPOWER on IntegriCloud