[llvm-commits] [llvm] r80877 - /llvm/trunk/include/llvm/ADT/ImmutableSet.h

Ted Kremenek kremenek at apple.com
Wed Sep 2 21:21:34 PDT 2009


Author: kremenek
Date: Wed Sep  2 23:21:34 2009
New Revision: 80877

URL: http://llvm.org/viewvc/llvm-project?rev=80877&view=rev
Log:
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).

Modified:
    llvm/trunk/include/llvm/ADT/ImmutableSet.h

Modified: llvm/trunk/include/llvm/ADT/ImmutableSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableSet.h?rev=80877&r1=80876&r2=80877&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/ImmutableSet.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableSet.h Wed Sep  2 23:21:34 2009
@@ -331,6 +331,7 @@
 
     uint32_t X = ComputeDigest(getLeft(), getRight(), getValue());
     Digest = X;
+    MarkedCachedDigest();
     return X;
   }
 };





More information about the llvm-commits mailing list