From 231dd7169dd24f87e6e460d1c4b6681e040fb23d Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 3 Sep 2009 04:21:34 +0000 Subject: [PATCH] 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 --- llvm/include/llvm/ADT/ImmutableSet.h | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h index 7c070d7a7f25..70fc1a691454 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; } };