| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
to be run on other declarations of blocks of code (e.g., Objective-C methods.)
llvm-svn: 48339
|
| |
|
|
| |
llvm-svn: 47958
|
| |
|
|
| |
llvm-svn: 47955
|
| |
|
|
|
|
| |
that aren't VarDecls.
llvm-svn: 47572
|
| |
|
|
|
|
|
| |
confluence points the liveness information for variables (Decls) and NOT
block-level expressions.
llvm-svn: 47506
|
| |
|
|
| |
llvm-svn: 47464
|
| |
|
|
|
|
|
| |
as the initializers for DeclStmts were not being registered as being
live at the start of the DeclStmt.
llvm-svn: 46837
|
| |
|
|
|
|
|
|
|
| |
and now we require a FunctionDecl* object so that we can also keep track of
all of the ParmDecls.
Modified clients of LiveVariables to conform to the new interface.
llvm-svn: 46490
|
| |
|
|
|
|
|
| |
dead at an assignment without taking into account if the variable was used in
the RHS of the assignment.
llvm-svn: 46153
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is because GNU-style Statement-expressions cause the last statement in the
statement-expression to act like an expression.
We now have two notions: block-level statements and block-level expressions.
The former are all Stmt* that appear in the list of statements in CFGBlocks. The
latter is the subset of the former; these block-level statements are used as
subexpressions somewhere in the AST. CFG::isBlockExpr() returns true for the
latter, not the former (previously isBlockExpr() always returned true for
non-Expr Stmt*).
Modified the LiveVariables analysis to also track liveness state for block-level
expressions (using the updated definition of block-level expressions).
Modified the dataflow solver so that when it records values for block-level
statements, it records the dataflow value *before* the transfer function for a
Stmt* is evaluated (not after). This is more in sync in what clients will want.
Modified CFGStmtVisitor to record the current block-level statement.
llvm-svn: 46143
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
values for the block-level expressions.
Modified 'LiveVariables' to provide the option to clients to record
liveness information for block-level expressions (using the above feature).
Modified 'DeadStores' to conform to the new interface of 'LiveVariables'.
Modified 'GRConstants' to compute liveness information for block-level
expressions.
llvm-svn: 46137
|
| |
|
|
| |
llvm-svn: 46133
|
| |
|
|
|
|
|
| |
to have a much simpler, cleaner interpretation of what is a "location"
in a function (as encoded by a CFG).
llvm-svn: 45846
|
| |
|
|
| |
llvm-svn: 45750
|
| |
|
|
|
|
| |
discussion of this change.
llvm-svn: 45410
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"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
|
| |
|
|
|
|
|
| |
state that occurred in subexpressions of Block-Level expressions. Bug and fix
provided by Nuno Lopes.
llvm-svn: 44224
|
| |
|
|
| |
llvm-svn: 42730
|
| |
|
|
|
|
| |
tracked BlkExpr information now maintained by the CFG class.
llvm-svn: 42498
|
| |
|
|
|
|
|
|
| |
properly kill variables. e.g:
(x) = 1;
llvm-svn: 42450
|
| |
|
|
|
|
| |
ExprDeclBitVector class for defining dataflow state.
llvm-svn: 42446
|
| |
|
|
|
|
|
|
|
|
| |
code that uses the solver to reflect the new location.
Created "FlowSensitive" subdirectory in include/clang/Analysis to hold
header files relating to flow-sensitive analyses. Moved
"DataflowValues.h" into this subdirectory.
llvm-svn: 42320
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
between forward and backward analyses, with trait classes being used
to implement the key differences in operations/functionality.
Converted the LiveVariables analysis to use the generic DataflowSolver. This,
along with removing some extra functionality that was not needed, reduced
the code for LiveVariables by over half.
Modified Driver code to handle the updated interface to LiveVariables.
Modified the DeadStores checker to handle the update interface to
LiveVariables.
Updated DataflowValues (generic ADT to store dataflow values) to also
store values for blocks. This is used by DeadStores. Updated some comments.
llvm-svn: 42293
|
| |
|
|
|
|
| |
Analysis/Visitors/*Visitors.h files.
llvm-svn: 42175
|
| |
|
|
|
|
| |
Decl is now svelte:-)
llvm-svn: 41935
|
| |
|
|
|
|
| |
Removed extraneous call to Observer->ObserveStmt when handling DeclRefExprs.
llvm-svn: 41890
|
| |
|
|
| |
llvm-svn: 41888
|
| |
|
|
|
|
| |
is much simpler now.
llvm-svn: 41885
|
| |
|
|
|
|
| |
warnings that some compilers diagnose
llvm-svn: 41847
|
| |
|
|
|
|
|
|
|
| |
that refer to direct function calls.
Modified interface of LiveVariables to only track liveness of VarDecls.
This cleans up a bunch of edge cases, and removed the bug just mentioned.
llvm-svn: 41797
|
| |
|
|
|
|
| |
"Audit" to "Observer" and "Observe"
llvm-svn: 41794
|
| |
|
|
|
|
|
|
|
|
| |
but never used.
Fix a bug in LiveVariables where uses on the LHS of self-assign
operators (e.g +=, *=, etc) would not be properly recorded in the
liveness state of the variable.
llvm-svn: 41757
|
| |
|
|
|
|
| |
that contained no declarations, or when a variable is declared but never used.
llvm-svn: 41756
|
| |
|
|
|
|
|
|
|
|
| |
to variables that are no longer live. This analysis is built on top
of CFGs and the LiveVariables analysis.
changes to driver:
added driver option "-check-dead-stores" to run the analysis
llvm-svn: 41754
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Finished 99% of analysis logic. Probably a few bugs.
- Added querying functions to query liveness.
- Added better pretty printing of liveness.
- Added better bookkeeping of per-variable liveness information.
- Added LiveVariablesAuditor interface, which allows "lazy" querying
of intra-basic block liveness information.
Driver:
- Minor cleanups involved in dumping liveness information.
llvm-svn: 41753
|
|
|
source-level CFGs. This code may change significantly in the near
future as we explore different means to implement dataflow analyses.
Added a driver option, -dump-live-variables, to view the output of
live variable analysis. This output is very ALPHA; it will be improved shortly.
llvm-svn: 41737
|