[PATCH] D12993: [analyzer] Add TK_EntireMemSpace invalidation trait.
Devin Coughlin via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 19 10:21:20 PDT 2015
dcoughlin created this revision.
dcoughlin added reviewers: krememek, zaks.anna.
dcoughlin added subscribers: cfe-commits, seaneveson.
This is a patch to support Sean Eveson's work on loop widening. It adds a new
TK_EntireMemSpace invalidation trait that, when applied to a MemSpaceRegion, indicates
that the entire memory space should be invalidated.
Clients would add this trait before invalidating. For example:
```
RegionAndSymbolInvalidationTraits ITraits;
ITraits.setTrait(MRMgr.getStackLocalsRegion(STC),
RegionAndSymbolInvalidationTraits::TK_EntireMemSpace);
```
This patch updates the existing logic invalidating global memspace regions for calls to
additionally handle arbitrary memspaces. When generating initial clusters during
cluster analysis we will now add a cluster to the worklist if the memspace for its
base is marked with TK_EntireMemSpace.
The patch also moves the logic for invalidating globals from ClusterAnalysis to
invalidateRegionsWorker so that it is not shared with removeDeadBindingsWorker.
There are no explicit tests with this patch -- but when applied to Sean's patch in
http://reviews.llvm.org/D12358 and after updating his code to set the trait,
the failing tests in that patch now pass.
http://reviews.llvm.org/D12993
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
lib/StaticAnalyzer/Core/RegionStore.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12993.35170.patch
Type: text/x-patch
Size: 5635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150919/97ffc6a8/attachment.bin>
More information about the cfe-commits
mailing list