[cfe-commits] r83040 - /cfe/trunk/lib/Analysis/RegionStore.cpp

Ted Kremenek kremenek at apple.com
Mon Sep 28 20:12:52 PDT 2009


Author: kremenek
Date: Mon Sep 28 22:12:50 2009
New Revision: 83040

URL: http://llvm.org/viewvc/llvm-project?rev=83040&view=rev
Log:
Revert r82939.  We can only not special case FieldRegions when the super region has also been invalidated.

Modified:
    cfe/trunk/lib/Analysis/RegionStore.cpp

Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=83040&r1=83039&r2=83040&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Mon Sep 28 22:12:50 2009
@@ -514,21 +514,17 @@
       continue;
     }
     
+    // FIXME: Special case FieldRegion/ElementRegion for more
+    // efficient invalidation.  We don't need to conjure symbols for
+    // these regions in all cases.
+    
     // Get the old binding.  Is it a region?  If so, add it to the worklist.
     if (const SVal *OldV = B.lookup(R)) {
       if (const MemRegion *RV = OldV->getAsRegion())
         WorkList.push_back(RV);
     }
     
-    if (isa<FieldRegion>(R) || isa<ElementRegion>(R) || isa<ObjCIvarRegion>(R)){
-      // For fields and elements, only remove the old binding.  The super
-      // region will get set with a default value from which we can lazily
-      // derive a new symbolic value.
-      B = RBFactory.Remove(B, R);
-      continue;
-    }
-    
-    // Invalidate the binding by conjuring a new symbol.
+    // Invalidate the binding.
     DefinedOrUnknownSVal V = ValMgr.getConjuredSymbolVal(R, Ex, T, Count);
     assert(SymbolManager::canSymbolicate(T) || V.isUnknown());
     B = RBFactory.Add(B, R, V);





More information about the cfe-commits mailing list