diff options
author | davidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-28 20:38:44 +0000 |
---|---|---|
committer | davidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-28 20:38:44 +0000 |
commit | 43fb76c1c6278d313ae7a273e94951dcc29f1963 (patch) | |
tree | 8a0222ff3ea81d5b3f64cf4d1bd860247cf62c52 /gcc/tree-ssa-ccp.c | |
parent | 0c0384c163a873c7b3c62d9269f66e5478503c92 (diff) | |
download | gcc-43fb76c1c6278d313ae7a273e94951dcc29f1963.tar.gz |
Add dbg count support for ccp
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145206 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 26b67224ea6..c7df5884783 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -208,6 +208,7 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" #include "target.h" #include "toplev.h" +#include "dbgcnt.h" /* Possible lattice values. */ @@ -666,6 +667,24 @@ ccp_initialize (void) } } +/* Debug count support. Reset the values of ssa names + VARYING when the total number ssa names analyzed is + beyond the debug count specified. */ + +static void +do_dbg_cnt (void) +{ + unsigned i; + for (i = 0; i < num_ssa_names; i++) + { + if (!dbg_cnt (ccp)) + { + const_val[i].lattice_val = VARYING; + const_val[i].value = NULL_TREE; + } + } +} + /* Do final substitution of propagated values, cleanup the flowgraph and free allocated storage. @@ -675,8 +694,11 @@ ccp_initialize (void) static bool ccp_finalize (void) { + bool something_changed; + + do_dbg_cnt (); /* Perform substitutions based on the known constant values. */ - bool something_changed = substitute_and_fold (const_val, false); + something_changed = substitute_and_fold (const_val, false); free (const_val); const_val = NULL; |