Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Added transfer function logic for sizeof(expr)/sizeof(type). This currently | Ted Kremenek | 2008-02-12 | 1 | -36/+88 | |
| | | | | | | | | | doesn't support VLAs. Reordered some cases in the switch statement of GRConstant::Visit() so that they are ordered alphabetically based on AST node type. llvm-svn: 47021 | |||||
* | Renamed local variable. | Ted Kremenek | 2008-02-12 | 1 | -11/+19 | |
| | | | | | | Added transfer function support for CharacterLiteral. llvm-svn: 47014 | |||||
* | Added GRBlockCounter class, which tracks the number of times blocks | Ted Kremenek | 2008-02-12 | 3 | -15/+105 | |
| | | | | | | | | | | have been visited in a path. Added GRBlockCounter as an item to be enqueued to the worklist. Modified "ProcessBranch" in GRConstants to prune branches with symbolic conditions that have been already taken. llvm-svn: 47010 | |||||
* | Consolidated use of BumpPtrAllocator shared by various ImmutableSet/ImmutableMap | Ted Kremenek | 2008-02-11 | 3 | -5/+9 | |
| | | | | | | | | | factories. Fixed a horrible bug in lval:DeclVar::classof(RValue* V); we weren't checking V was an LValue, allowing nonlval::ConcereteInts to match isa<lval::DeclVar>. llvm-svn: 46976 | |||||
* | Separate bindings for subexpressions to be in a separate map for | Ted Kremenek | 2008-02-11 | 3 | -219/+261 | |
| | | | | | | | | bindings for block-level expressions. Moved pretty-printing logic (DOT) for ValueStates to ValueState.cpp. llvm-svn: 46965 | |||||
* | Split off expression-bindings in ValueState from variable-bindings. | Ted Kremenek | 2008-02-08 | 3 | -127/+135 | |
| | | | | llvm-svn: 46892 | |||||
* | Changed "GetValue" methods to take an | Ted Kremenek | 2008-02-08 | 3 | -65/+72 | |
| | | | | | | | Expr* instead of a Stmt*, since we only store bindings for Expr*. llvm-svn: 46891 | |||||
* | Moved implementation of "RemoveDeadBindings" from the main | Ted Kremenek | 2008-02-08 | 3 | -74/+82 | |
| | | | | | | GRConstants logic to ValueStateManager. llvm-svn: 46888 | |||||
* | Removed ability to create symbol bindings | Ted Kremenek | 2008-02-08 | 2 | -23/+3 | |
| | | | | | | in VarKey and VariableBindingsTy. llvm-svn: 46887 | |||||
* | Implemented transfer functions for "<<" and ">>" when the RValues are | Ted Kremenek | 2008-02-08 | 1 | -4/+2 | |
| | | | | | | ConcreteInts. llvm-svn: 46883 | |||||
* | Implemented transfer functions for Statement-Expressions and Commas. | Ted Kremenek | 2008-02-08 | 1 | -2/+17 | |
| | | | | | | Fixed bug in dispatching to the correct transfer function for |=, &=, and ^|. llvm-svn: 46880 | |||||
* | More variable renamings. | Ted Kremenek | 2008-02-08 | 4 | -23/+23 | |
| | | | | llvm-svn: 46875 | |||||
* | Renamed InvalidValue to UnknownVal. | Ted Kremenek | 2008-02-08 | 4 | -35/+35 | |
| | | | | | | Renamed UninitializedValue to UninitializedVal. llvm-svn: 46874 | |||||
* | Added some more opcode pretty-printing. | Ted Kremenek | 2008-02-07 | 2 | -7/+10 | |
| | | | | | | Minor cleanups with generating nodes for NULL-pointer dereferences. llvm-svn: 46851 | |||||
* | Added proof-of-concept NULL pointer diagnostics to GRConstants. | Ted Kremenek | 2008-02-07 | 1 | -5/+27 | |
| | | | | | | Modified the driver to pass the Diagnostic object to GRConstants. llvm-svn: 46847 | |||||
* | Added support to distinguish between both implicit and explicit null ↵ | Ted Kremenek | 2008-02-07 | 1 | -19/+36 | |
| | | | | | | dereferences. llvm-svn: 46846 | |||||
* | Added recording of "implicit" NULL dereferences of symbolic pointers. | Ted Kremenek | 2008-02-07 | 5 | -47/+154 | |
| | | | | llvm-svn: 46843 | |||||
* | get the tree building again | Chris Lattner | 2008-02-07 | 1 | -1/+2 | |
| | | | | llvm-svn: 46840 | |||||
* | Added several guards in transfer functions for "InvalidValues". | Ted Kremenek | 2008-02-07 | 3 | -21/+113 | |
| | | | | | | | | | | | | | | Fixed bug in RemoveDeadBindings by implementing a simple "mark-and-sweep" cleaner over the bindings, starting from the Decls and block-level expressions that are considered "live" by the Liveness analysis. Fixed bug in isa<> implementation for class LValue. Added "VisitDeclRefExpr" to GRConstants so that we explicitly bind the current value of variable to the Block-level Expression (i.e., when the DeclRefExpr is at the CFGBlock level). llvm-svn: 46839 | |||||
* | Fixed bug in LiveVariables analysis where Block-level exprs appearing | Ted Kremenek | 2008-02-07 | 1 | -1/+6 | |
| | | | | | | | as the initializers for DeclStmts were not being registered as being live at the start of the DeclStmt. llvm-svn: 46837 | |||||
* | Added transfer function logic for ReturnStmts. | Ted Kremenek | 2008-02-07 | 4 | -5/+46 | |
| | | | | | | Fixed insidious bug in handling dereferences. llvm-svn: 46835 | |||||
* | Major code refactoring/cleanup with transfer function logic. Now the | Ted Kremenek | 2008-02-06 | 3 | -300/+331 | |
| | | | | | | code structure is more suitable for additional symbolic analysis. llvm-svn: 46831 | |||||
* | Added main transfer function support for unary operator "!". | Ted Kremenek | 2008-02-06 | 1 | -0/+22 | |
| | | | | llvm-svn: 46815 | |||||
* | Added assumption logic for symbolic non-lvalues when used in conditions such as | Ted Kremenek | 2008-02-06 | 3 | -5/+34 | |
| | | | | | | | "if(x)". On the true branch we know the value is != 0, and on the false branch we know it is 0. llvm-svn: 46814 | |||||
* | Fixed bug in '=' transfer function: RHS does not have to be a non-LValue. | Ted Kremenek | 2008-02-06 | 1 | -2/+1 | |
| | | | | llvm-svn: 46797 | |||||
* | Fixed signedness bug in cast transfer function when casting integers to ↵ | Ted Kremenek | 2008-02-06 | 3 | -27/+35 | |
| | | | | | | | | pointers. Removed lval::SymIntConstraintVal; wrappers for symbolic constraints are not lvalues (only integers that evaluate to !0 or 0). llvm-svn: 46796 | |||||
* | Modified state pretty-printing to include the '!=' and '==' constraints on | Ted Kremenek | 2008-02-06 | 1 | -0/+40 | |
| | | | | | | symbols (for constant integers). llvm-svn: 46795 | |||||
* | Disabled operator= for ValueStateImpl. | Ted Kremenek | 2008-02-06 | 1 | -4/+9 | |
| | | | | | | | ValueState no longer inherits FoldingSetNode (not needed). Removed redundant operator= implementation for ValueState (it simply did the default behavior). llvm-svn: 46794 | |||||
* | Fixed bug when allocating a ValueStateImpl object in getPersistentState() | Ted Kremenek | 2008-02-06 | 1 | -1/+1 | |
| | | | | | | | using the bump-pointer allocator and a placed new; we accidentally allocated a ValueStateImpl* instead, causing an overrun when we did a placed new(). llvm-svn: 46793 | |||||
* | Added some skeleton code for performing "assume" on symbols: e.g. assume($0 ↵ | Ted Kremenek | 2008-02-06 | 4 | -10/+144 | |
| | | | | | | | | | != 0). This action will add constraints to the possible values of a symbol. Still needs to be debugged. llvm-svn: 46789 | |||||
* | Added pretty-printing support for lval::SymIntConstraintVal and | Ted Kremenek | 2008-02-05 | 2 | -29/+133 | |
| | | | | | | | | | nonlval::SymIntConstraintVal. Reworked transfer function for '==' and '!=' for LValues to return SymIntConstraintVal when comparing a symbol with a constant. llvm-svn: 46778 | |||||
* | Moved implementation of cast<> for SymbolData closer to SymbolData's definition. | Ted Kremenek | 2008-02-05 | 1 | -24/+28 | |
| | | | | llvm-svn: 46772 | |||||
* | Added new "NonLValue" class: SymIntConstraintVal. This class represents a binary | Ted Kremenek | 2008-02-05 | 1 | -4/+18 | |
| | | | | | | contraint between a symbol and an integer constant. llvm-svn: 46771 | |||||
* | Moved subclasses of LValue and NonLValue into their own namespaces. | Ted Kremenek | 2008-02-05 | 4 | -211/+224 | |
| | | | | | | This noticeably cleans up the naming of these classes. llvm-svn: 46770 | |||||
* | Added "SymIntConstraint", a utility class to represent intermediate values for | Ted Kremenek | 2008-02-05 | 2 | -11/+76 | |
| | | | | | | | transfer function evaluation that represent constraints between symbolic values and constant integers. llvm-svn: 46769 | |||||
* | Added "batch" processing versions of Nodify and SetValue. Created typedefs | Ted Kremenek | 2008-02-05 | 3 | -15/+43 | |
| | | | | | | for buffers for RValues and States. llvm-svn: 46759 | |||||
* | Added a "ConstantNotEq" map to ValueState (and added necessary typedefs and ↵ | Ted Kremenek | 2008-02-05 | 3 | -10/+36 | |
| | | | | | | factory objects to ValueStateManager). llvm-svn: 46758 | |||||
* | Added some comments. | Ted Kremenek | 2008-02-05 | 1 | -2/+14 | |
| | | | | llvm-svn: 46756 | |||||
* | Renamed typedef "iterator" in ValueState to "vb_iterator" (for ↵ | Ted Kremenek | 2008-02-05 | 2 | -6/+6 | |
| | | | | | | "VariableBindings"). llvm-svn: 46755 | |||||
* | Reordered fields/methods in ValueState to make it more aesthetically pleasing. | Ted Kremenek | 2008-02-05 | 1 | -11/+12 | |
| | | | | llvm-svn: 46754 | |||||
* | Overhauling of "ValueState" so that it represents its own functional data | Ted Kremenek | 2008-02-05 | 3 | -55/+174 | |
| | | | | | | structure that can contain several maps, not just one. llvm-svn: 46744 | |||||
* | ValueManager now uses the BumpPtrAllocator owned by the ExplodedGraph. | Ted Kremenek | 2008-02-05 | 3 | -4/+7 | |
| | | | | llvm-svn: 46740 | |||||
* | Simplified transfer functions for '++' and '--' | Ted Kremenek | 2008-02-05 | 1 | -16/+4 | |
| | | | | llvm-svn: 46732 | |||||
* | Implemented initial transfer function support for '&&', '||', '?', and | Ted Kremenek | 2008-02-05 | 4 | -12/+171 | |
| | | | | | | __builtin_choose. llvm-svn: 46731 | |||||
* | Added file that should have been in my previous commit. | Ted Kremenek | 2008-02-04 | 1 | -0/+116 | |
| | | | | llvm-svn: 46722 | |||||
* | Created ValueStateManager, a full-blown class to manage the states | Ted Kremenek | 2008-02-04 | 2 | -140/+92 | |
| | | | | | | | | created for GRConstants. Moved instances of ValueManager and SymbolManager inside this class. The goal is to gradually separate more of the state management from the state transformation. llvm-svn: 46721 | |||||
* | Implemented transfer function for unary '~'. | Ted Kremenek | 2008-02-04 | 3 | -0/+21 | |
| | | | | llvm-svn: 46708 | |||||
* | Implemented casts for ConcreteInt and ConcreteIntLValue. | Ted Kremenek | 2008-02-01 | 3 | -14/+88 | |
| | | | | | | Implemented '==' and '!=' for ConcreteIntLValue. llvm-svn: 46630 | |||||
* | Added skeleton for new LValue class ConcereteIntLValue. | Ted Kremenek | 2008-01-31 | 1 | -44/+83 | |
| | | | | llvm-svn: 46624 | |||||
* | Moved RValue code in GRConstants.cpp to RValue.[h,cpp]. | Ted Kremenek | 2008-01-31 | 4 | -726/+836 | |
| | | | | | | Moved ValueKey/ValueMap declaration to ValueState.h. llvm-svn: 46618 |