aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RangeConstraintManager.cpp
AgeCommit message (Collapse)Author
2010-01-25Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek
(1) libAnalysis is a generic analysis library that can be used by Sema. It defines the CFG, basic dataflow analysis primitives, and inexpensive flow-sensitive analyses (e.g. LiveVariables). (2) libChecker contains the guts of the static analyzer, incuding the path-sensitive analysis engine and domain-specific checks. Now any clients that want to use the frontend to build their own tools don't need to link in the entire static analyzer. This change exposes various obvious cleanups that can be made to the layout of files and headers in libChecker. More changes pending. :) This change also exposed a layering violation between AnalysisContext and MemRegion. BlockInvocationContext shouldn't explicitly know about BlockDataRegions. For now I've removed the BlockDataRegion* from BlockInvocationContext (removing context-sensitivity; although this wasn't used yet). We need to have a better way to extend BlockInvocationContext (and any LocationContext) to add context-sensitivty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05Remove references to 'Checker' and 'GRTransferFuncs' fromTed Kremenek
GRStateManager. Having these references was an abstraction violation, as they really should only be known about GRExprEngine. This change required adding a new 'ProcessAssume' callback in GRSubEngine. GRExprEngine implements this callback by calling 'EvalAssume' on all registered Checker objects as well as the registered GRTransferFunc object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92549 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28lib/Analysis: Remove VISIBILITY_HIDDEN from definitions in anonymous namespaceKovarththanan Rajaratnam
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90028 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11Move the ManagerRegistry to the Analysis library to resolve the layering ↵Chandler Carruth
violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86863 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-24Remove uses of std::ostream from libAnalysis.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74136 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18Remove GRStateManager& field from SimpleConstraintManager.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18libAnalysis:Ted Kremenek
- Remove the 'isFeasible' flag from all uses of 'Assume'. - Remove the 'Assume' methods from GRStateManager. Now the only way to create a new GRState with an assumption is to use the new 'assume' methods in GRState. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73731 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17Remove more uses of GRStateRef.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73648 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Tweak pretty-printing of constraints.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*Daniel Dunbar
driver taking lib/Driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18Revise comment. Comparing pointer values in 'Range' wasn't the performance ↵Ted Kremenek
issue I thought it was, but it is still worth ordering Range objects by their APSInt values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64921 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18Fix performance bug in RangeConstraintManager (that I introduced):Ted Kremenek
When comparing if one Range is "less" than another, compare the actual APSInt numeric values instead of their pointer addresses. This ensures that the ImmutableSet in RangeSet always has a consistent ordering between Ranges. This is critical for generating the same digest/hash for the contents of the sets. This was a serious performance bug because it would often cause state caching to be disabled along complicated paths. Along the way: - Put Range and RangeSet in the "anonymous namespace" and mark them hidden git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64890 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17Revised RangeConstraintManager based on several discussions with Ben Laurie andTed Kremenek
Zhongxing Xu. The resultant code is less than 1/2 the size of the original. Key highlights: - All CouldBeXXX methods have been removed. Checking for feasibility is now just done in the AddXXX methods. - RangeSets now represent "all possible values" explicitly as the range set { [min, max] } instead of the empty set. The empty set now represents "no feasible values". This change consolidated much of the core algorithm to only have one code path instead of alternate paths that considered the empty set to represent "all possible falues." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64787 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-16Add pretty-printing (for GraphViz) support for RangeConstraintManager.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-16Do not register 'RangeConstraintManager' as the default ConstraintManager.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64627 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-14Patch by Ben Laurie:Ted Kremenek
ConstraintManager: - constify getSymVal() BasicConstraintManager: - Pull out logic that would be common to ConstraintManagers of a similar nature and put them in a parent class called 'SimpleConstraintManager'. RangeConstraintManager: - Added a new prototype ConstraintManager to track ranges of variables! This ConstraintManager keeps tracks of ranges of concrete integers that a symbolic integer may have. AnalysisConsumer: - Add driver option to use RangeConstraintManager with GRExprEngine-based analyses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64558 91177308-0d34-0410-b5e6-96231b3b80d8