Implement RegionStoreManager::RemoveDeadBindings(). This prunes several false warning caused by removal of symbolic constraints. Currently we just mark all symbols live. Further optimization for dead binding removal needed.
llvm-svn: 58982
This commit is contained in:
parent
8e58c52b37
commit
18d6fd45de
|
|
@ -83,10 +83,7 @@ public:
|
|||
|
||||
Store RemoveDeadBindings(Store store, Stmt* Loc, const LiveVariables& Live,
|
||||
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots,
|
||||
LiveSymbolsTy& LSymbols, DeadSymbolsTy& DSymbols) {
|
||||
// FIXME: Implement this.
|
||||
return store;
|
||||
}
|
||||
LiveSymbolsTy& LSymbols, DeadSymbolsTy& DSymbols);
|
||||
|
||||
Store BindDecl(Store store, const VarDecl* VD, Expr* Ex, SVal InitVal,
|
||||
unsigned Count);
|
||||
|
|
@ -432,6 +429,25 @@ Store RegionStoreManager::BindCompoundLiteral(Store store,
|
|||
return store;
|
||||
}
|
||||
|
||||
Store RegionStoreManager::RemoveDeadBindings(Store store, Stmt* Loc,
|
||||
const LiveVariables& Live,
|
||||
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots,
|
||||
LiveSymbolsTy& LSymbols, DeadSymbolsTy& DSymbols) {
|
||||
|
||||
RegionBindingsTy B = GetRegionBindings(store);
|
||||
typedef SVal::symbol_iterator symbol_iterator;
|
||||
|
||||
// FIXME: Mark all region binding value's symbol as live. We also omit symbols
|
||||
// in SymbolicRegions.
|
||||
for (RegionBindingsTy::iterator I = B.begin(), E = B.end(); I != E; ++I) {
|
||||
SVal X = I.getData();
|
||||
for (symbol_iterator SI=X.symbol_begin(), SE=X.symbol_end(); SI!=SE; ++SI)
|
||||
LSymbols.insert(*SI);
|
||||
}
|
||||
|
||||
return store;
|
||||
}
|
||||
|
||||
void RegionStoreManager::print(Store store, std::ostream& Out,
|
||||
const char* nl, const char *sep) {
|
||||
llvm::raw_os_ostream OS(Out);
|
||||
|
|
|
|||
Loading…
Reference in New Issue