Implement lazy "copying" of structures and arrays in RegionStore. While
RegionStore already lazily abstracted the contents of arrays and structs, when doing an assignment from one array/struct to another we did an explicit element-wise copy, which resulted in a loss of laziness and huge performance problem when analyzing many code bases. Now RegionStoreManager handles such assignments using a new SVal could 'LazyCompoundSVal', which basically means the value of a given struct or array (a MemRegion*) in a specific state (GRState). When we do a load from a field whose encompassing struct binds to a LazyCompoundSVal, we essentially do a field lookup in the original structure. This means we have essentially zero copying of data for structs/arrays and everything stays lazy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78268 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Analysis/PathSensitive/BasicValueFactory.h 23 additions, 1 deletioninclude/clang/Analysis/PathSensitive/BasicValueFactory.h
- include/clang/Analysis/PathSensitive/MemRegion.h 13 additions, 2 deletionsinclude/clang/Analysis/PathSensitive/MemRegion.h
- include/clang/Analysis/PathSensitive/SVals.h 22 additions, 1 deletioninclude/clang/Analysis/PathSensitive/SVals.h
- include/clang/Analysis/PathSensitive/ValueManager.h 4 additions, 0 deletionsinclude/clang/Analysis/PathSensitive/ValueManager.h
- lib/Analysis/BasicValueFactory.cpp 26 additions, 0 deletionslib/Analysis/BasicValueFactory.cpp
- lib/Analysis/RegionStore.cpp 168 additions, 37 deletionslib/Analysis/RegionStore.cpp
- lib/Analysis/SVals.cpp 15 additions, 1 deletionlib/Analysis/SVals.cpp
Loading
Please register or sign in to comment