diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-09 07:42:33 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-09 07:42:33 +0000 |
commit | 7ef508afbc4651362f05e0989f7a1700f50a5f22 (patch) | |
tree | 08fed19e61a85ce0d3651cf26bc3f32f2b789490 /lib/Solver/IndependentSolver.cpp | |
parent | 78b1df8bd1664931fe32d186a21a7ebf58ad9489 (diff) | |
download | klee-7ef508afbc4651362f05e0989f7a1700f50a5f22.tar.gz |
Add initial support for constant Arrays.
- This doesn't actually start using them, it just attempts to update all clients to do the right thing in the presence of them. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Solver/IndependentSolver.cpp')
-rw-r--r-- | lib/Solver/IndependentSolver.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Solver/IndependentSolver.cpp b/lib/Solver/IndependentSolver.cpp index 69f9567c..1f3ea798 100644 --- a/lib/Solver/IndependentSolver.cpp +++ b/lib/Solver/IndependentSolver.cpp @@ -95,6 +95,12 @@ public: for (unsigned i = 0; i != reads.size(); ++i) { ReadExpr *re = reads[i].get(); const Array *array = re->updates.root; + + // Reads of a constant array don't alias. + if (re->updates.root->isConstantArray() && + !re->updates.head) + continue; + if (!wholeObjects.count(array)) { if (ConstantExpr *CE = dyn_cast<ConstantExpr>(re->index)) { DenseSet<unsigned> &dis = elements[array]; |