summaryrefslogtreecommitdiff
path: root/gcc/df-core.c
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-05 16:04:12 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-05 16:04:12 +0000
commit314966f44100eab5d60e0b7260172a661d2e30ee (patch)
treeb1eb63f779e57b66e9e082792080cffb4ebb30c1 /gcc/df-core.c
parent4e549567c4c8d21e6551068f7cae378c78d8fd44 (diff)
downloadgcc-314966f44100eab5d60e0b7260172a661d2e30ee.tar.gz
2008-08-05 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Remove --enable-checking=df from default settings. * tree-pass.h (TODO_df_verify): New. Shift TODO_mark_first_instance. * df-core.c (df_finish_pass) [ENABLE_CHECKING]: Schedule verification if the parameter is true. (df_analyze) [!ENABLE_DF_CHECKING]: Also do verification if the DF_VERIFY_SCHEDULED flag is true. * df.h (enum df_changeable_flags): Add DF_VERIFY_SCHEDULED. (df_finish_pass): Adjust prototype. * passes.c (execute_todo): Schedule verification if TODO_df_verify is true. * see.c (pass_see): Add TODO_df_verify. * loop-init.c (pass_rtl_move_loop_invariants): Add TODO_df_verify. * global.c (rest_of_handle_global_alloc): Schedule verification after the pass. * local-alloc.c (rest_of_handle_local_alloc): Schedule verification before the pass. * function.c (pass_thread_prologue_and_epilogue): Add TODO_df_verify. * gcse.c (rest_of_handle_gcse): Adjust call to df_finish_pass. * loop-iv.c (iv_analysis_done): Schedule verification after the pass. * config/sh/sh.c (sh_output_mi_thunk): Remove dead code. * config/ia64/ia64.c (ia64_reorg): Adjust call to df_finish_pass. * config/bfin/bfin.c (bfin_reorg): Adjust call to df_finish_pass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127225 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df-core.c')
-rw-r--r--gcc/df-core.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/df-core.c b/gcc/df-core.c
index 453d61a999f..3b4e7b3e579 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -79,7 +79,7 @@ Here is an example of using the dataflow routines.
df_dump (stderr);
- df_finish_pass ();
+ df_finish_pass (false);
DF_[ru,rd,urec,ri,chain]_ADD_PROBLEM adds a problem, defined by an
instance to struct df_problem, to the set of problems solved in this
@@ -633,7 +633,7 @@ df_remove_problem (struct dataflow *dflow)
of the changeable_flags. */
void
-df_finish_pass (void)
+df_finish_pass (bool verify ATTRIBUTE_UNUSED)
{
int i;
int removed = 0;
@@ -694,6 +694,11 @@ df_finish_pass (void)
df_set_clean_cfg ();
#endif
#endif
+
+#ifdef ENABLE_CHECKING
+ if (verify)
+ df->changeable_flags |= DF_VERIFY_SCHEDULED;
+#endif
}
@@ -1100,9 +1105,10 @@ df_analyze (void)
if (dump_file)
fprintf (dump_file, "df_analyze called\n");
-#ifdef ENABLE_DF_CHECKING
- df_verify ();
-#endif
+#ifndef ENABLE_DF_CHECKING
+ if (df->changeable_flags & DF_VERIFY_SCHEDULED)
+#endif
+ df_verify ();
for (i = 0; i < df->n_blocks; i++)
bitmap_set_bit (current_all_blocks, df->postorder[i]);
@@ -1509,9 +1515,11 @@ void
df_verify (void)
{
df_scan_verify ();
+#ifdef ENABLE_DF_CHECKING
df_lr_verify_transfer_functions ();
if (df_live)
df_live_verify_transfer_functions ();
+#endif
}
#ifdef DF_DEBUG_CFG