summaryrefslogtreecommitdiffstats
path: root/clang/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* Added some experimental optimizations to remove dead values from theTed Kremenek2008-01-171-14/+51
| | | | | | state. llvm-svn: 46106
* Changed sorting criteria for DSPtr to put sub-expressions first in the valueTed Kremenek2008-01-161-1/+1
| | | | | | | map. This will allow us to quickly prune them from maps without searching the entire map. llvm-svn: 46101
* Changed sorting criteria for DSPtr to sort Decl* before Expr*, andTed Kremenek2008-01-161-2/+5
| | | | | | to sort sub-expressions before Block-level expressions. llvm-svn: 46100
* IntegerLiterals are no longer evaluated to create separate nodes; theirTed Kremenek2008-01-161-15/+20
| | | | | | values are determined when evaluating the parent expression. llvm-svn: 46096
* Fixed bug where we performed addition instead of subtraction duringTed Kremenek2008-01-161-1/+1
| | | | | | constant propagation. llvm-svn: 46095
* Fixed iterator bug in ExplodedNodeImpl::NodeGroup::end(); we would improperlyTed Kremenek2008-01-162-2/+2
| | | | | | | | | handle the case where the number of nodes was 0. Fixed bug in GREngineImpl where we did not proceed to the next statement when processing a PostStmt location. llvm-svn: 46093
* Added initial graph visualization support for the GRConstants analysis.Ted Kremenek2008-01-161-11/+85
| | | | llvm-svn: 46092
* Added support from retrieving stored values to variables.Ted Kremenek2008-01-161-2/+6
| | | | llvm-svn: 46087
* Added support for assignments in GRConstants.Ted Kremenek2008-01-161-0/+24
| | | | llvm-svn: 46086
* Fixed bug where GRConstants::AddBindings() did not check for valuesTed Kremenek2008-01-161-1/+2
| | | | | | that were "not a constant." llvm-svn: 46085
* Fixed bug in cleanup of nodes in ExplodedNodeImpl where we should directlyTed Kremenek2008-01-161-1/+1
| | | | | | call the dstor instead of using delete. llvm-svn: 46084
* Hooked up the GRConstants analysis to the driver.Ted Kremenek2008-01-162-1/+15
| | | | | | | Fixed some compilation errors with GREngine that showed up during template instantiation. llvm-svn: 46074
* More cleanups in DoStmt. The NodeSets are now vectors instead of sets, sinceTed Kremenek2008-01-161-21/+14
| | | | | | | node caching in GREngine will guarantee that we do not insert a node twice into a nodeset. llvm-svn: 46071
* Adjusted DSPtr::Profile method again, since my last patch broke the build.Ted Kremenek2008-01-161-1/+2
| | | | llvm-svn: 46051
* Changed 'Profile' method for DSPtr to incorporate the flags from theTed Kremenek2008-01-161-1/+1
| | | | | | variant type, and not just the pointer value. llvm-svn: 46049
* Renamed some internal classes for the GR-Constant Propagation analysis.Ted Kremenek2008-01-161-38/+62
| | | | | | | | Cleaned up GRConstants::AddBinding to not directly reference the predecessor node. Now we just manipulate the current state, and a driver function creates nodes as needed. llvm-svn: 46040
* Added skeleton implementation of new constant-prop. analysis usingTed Kremenek2008-01-151-0/+273
| | | | | | the graph reachability engine. llvm-svn: 46036
* Removed implicit transitions to a "BlockExit" location; we now handleTed Kremenek2008-01-151-16/+7
| | | | | | | the end of the block by processing empty blocks (at BlockEntrance) or when we have just processed the last statement in a block (at PostStmt). llvm-svn: 45991
* Added prototype implementation of path-sens. analysis core engine.Ted Kremenek2008-01-141-0/+261
| | | | llvm-svn: 45986
* Moved destructor logic of templated class ExplodedGraph to non-templatedTed Kremenek2008-01-131-0/+17
| | | | | | parent class ExplodedGraphImpl. llvm-svn: 45930
* Created ExplodedGraph.cpp and moved most method implementations ofTed Kremenek2008-01-131-0/+70
| | | | | | | | | ExplodedNodeImpl::NodeGroup from being defined inline to being defined "out-of-line" in ExplodedGraph.cpp. This removes a dependence on including <vector> in ExplodedGraph.h, and will hopefully result in smaller generated code with negligible performance impact. llvm-svn: 45928
* Added ProgramPoint.cpp, which implements several methods of the subclassesTed Kremenek2008-01-111-0/+65
| | | | | | of ProgramPoint. llvm-svn: 45866
* Renamed ProgramEdge to ProgramPoint and changed subclasses of ProgramEdgeTed Kremenek2008-01-111-1/+1
| | | | | | | to have a much simpler, cleaner interpretation of what is a "location" in a function (as encoded by a CFG). llvm-svn: 45846
* Removed some files related to the path-sensitive solver as part of someTed Kremenek2008-01-092-273/+0
| | | | | | code restructuring. (new files will be introduced shortly) llvm-svn: 45785
* Added VISIBILITY_HIDDEN to classes/structs in anonymous namespaces.Ted Kremenek2008-01-083-7/+17
| | | | llvm-svn: 45750
* Relocated comment in header.Ted Kremenek2008-01-081-2/+2
| | | | llvm-svn: 45728
* Added more boilerplate for processing end-of-paths.Ted Kremenek2008-01-071-1/+5
| | | | llvm-svn: 45724
* Added ownership of "checker state" within the ExplodedGraph. Moved code thatTed Kremenek2008-01-071-20/+24
| | | | | | | creates the initial root node from the constructor of ReachabilityEngine to ReachabilityEngine::ExecuteWorklist. llvm-svn: 45722
* Renamed SimulVertex, SimulGraph, and SimulEngine to: Ted Kremenek2008-01-072-233/+170
| | | | | | | | | | | | ExplodedNode, ExplodedGraph (to match the vocabulary in the RHS paper) ReachabilityEngine The implementation of the core of the path-sensitive dataflow solver has been de-templatized and places in ReachabilityEngine.cpp. The solver is still incomplete. llvm-svn: 45711
* renamed class "GRCP" (Graph Reachabilty Constant Propagation) toTed Kremenek2008-01-031-13/+13
| | | | | | | "GREngine" (Graph Reachability Engine). The idea is to provide a separation of concerns between the constant prop. details and the core analysis engine. llvm-svn: 45555
* Implemented End-Of-Path processing.Ted Kremenek2008-01-031-14/+17
| | | | llvm-svn: 45554
* Initial checking of GRConstantPropagation.cpp, which implements a constantTed Kremenek2008-01-031-0/+325
| | | | | | | | propagation analysis via graph reachability. This analysis (which is incomplete) will be the basis for later developments on the core engine for path-sensitive analysis analysis. llvm-svn: 45552
* remove attribution from makefiles.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45412
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-293-6/+6
| | | | | | discussion of this change. llvm-svn: 45410
* Directory restructing of Analysis files.Ted Kremenek2007-12-213-3/+3
| | | | | | | | | | | Created include/clang/Analysis/Analyses directory. - Moved LiveVariables.h and UninitializedValues.h into this dir. Moved ExprDeclBitVector.h into Analysis/Support. Updated all clients who use these headers to reflect the new paths. llvm-svn: 45292
* For uninitialized values analysis, added special treatment for declarationsTed Kremenek2007-12-131-1/+16
| | | | | | | | | | | | | | | of array types. For things like: char x[10]; we should treat "x" as being initialized, because the variable "x" really refers to the memory block of the array. Clearly x[1] is uninitialized, but expressions like "(char*) x" really do refer to an initialized value. This simple dataflow analysis does not reason about the contents of arrays. This fixes: PR 1859 (http://llvm.org/bugs/show_bug.cgi?id=1859) llvm-svn: 44984
* Fixed bug in live-variable analysis and uninitialized-values analysis whereTed Kremenek2007-12-132-3/+14
| | | | | | | | | we incorrectly examine the expression within a sizeof() for use in computing dataflow values. This fixes: PR 1858 (http://llvm.org/bugs/show_bug.cgi?id=1858) llvm-svn: 44982
* TargetInfo no longer includes a reference to SourceManager.Ted Kremenek2007-12-122-6/+6
| | | | | | | | | | | | | | | Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation. Added many utility methods to FullSourceLoc to provide shorthand for: FullLoc.getManager().someMethod(FullLoc.getLocation()); instead we have: FullLoc.someMethod(); Modified TextDiagnostics (and related classes) to use this short-hand. llvm-svn: 44957
* Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek2007-12-112-4/+5
| | | | | | | | | | | | | | | | | | SourceManager is passed by reference, allowing the SourceManager to be associated with a specific translation unit, and not the entire execution of the driver. Modified all users of Diagnostics to comply with this new interface. Integrated SourceManager as a member variable of TargetInfo. TargetInfo will eventually be associated with a single translation unit (just like SourceManager). Made the SourceManager reference in ASTContext private. Provided accessor getSourceManager() for clients to use instead. Modified clients to comply with new interface. llvm-svn: 44878
* GCC has an extension where the left hand side of the ? : operator can be ↵Anders Carlsson2007-11-301-1/+7
| | | | | | omitted. Handle this in a few more places. llvm-svn: 44462
* Fixed bogus culling of uninitialized-values "taint" propagation during ↵Ted Kremenek2007-11-241-10/+6
| | | | | | | | | | | | assignments. We accidentally were throttling the propagation of uninitialized state across assignments (e.g. x = y). Thanks to Anders Carlsson for spotting this problem. Added test cases to test suite to provide regression testing for the uninitialized values analysis. llvm-svn: 44306
* Updated CFGStmtVisitor and CFGRecStmtVisitor to have a notion ofTed Kremenek2007-11-202-16/+5
| | | | | | | | | | | | | | | | "block-expressions" when visiting arbitrary expressions (via calls to "Visit()"). This results in a refactoring where a dataflow analysis no longer needs to always special case when handling block-expressions versus non-block expressions. Updated LiveVariables and UninitializedValues to conform to the slightly altered interface of these visitor classes. Thanks to Nuno Lopes for providing a test case that illustrated some fundamental problems in the current design of the CFGXXXStmtVisitor classes and how they were used. llvm-svn: 44246
* Fixed bug where LiveVariables was not properly propagating updates to livenessTed Kremenek2007-11-191-1/+1
| | | | | | | state that occurred in subexpressions of Block-Level expressions. Bug and fix provided by Nuno Lopes. llvm-svn: 44224
* Add a new Rewriter::getRangeSize method.Chris Lattner2007-10-162-2/+2
| | | | | | | | Rename SourceRange::Begin()/End() to getBegin()/getEnd() for consistency with other code. Start building the rewriter towards handling @encode. llvm-svn: 43047
* move IdentifierTable.h from liblex to libbasic.Chris Lattner2007-10-071-1/+0
| | | | llvm-svn: 42730
* Migrated LiveVariables and UninitializedVariables to now use theTed Kremenek2007-10-013-29/+28
| | | | | | tracked BlkExpr information now maintained by the CFG class. llvm-svn: 42498
* Fixed bug where assignments to variables wrapped in parentheses would notTed Kremenek2007-09-281-14/+27
| | | | | | | | properly kill variables. e.g: (x) = 1; llvm-svn: 42450
* Fixed UninitializedValues to properly propagate uninitialized "taint"Ted Kremenek2007-09-281-4/+14
| | | | | | in assignment operations of the form +=, -=, *=, etc. llvm-svn: 42449
* DeadStores no longer reports warnings for stores to non-local variables.Ted Kremenek2007-09-281-20/+21
| | | | llvm-svn: 42447
* Significant cleanups and bug-fixes to LiveVariables. Uses new refactoredTed Kremenek2007-09-282-39/+63
| | | | | | ExprDeclBitVector class for defining dataflow state. llvm-svn: 42446
OpenPOWER on IntegriCloud