+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.
+
2007-08-05 Vladimir Yanovsky <yanov@il.ibm.com>
Revital Eres <eres@il.ibm.com>
reorder_var_tracking_notes ();
timevar_pop (TV_VAR_TRACKING);
}
- df_finish_pass ();
+ df_finish_pass (false);
}
\f
/* Handle interrupt_handler, exception_handler and nmi_handler function
variable_tracking_main ();
timevar_pop (TV_VAR_TRACKING);
}
- df_finish_pass ();
+ df_finish_pass (false);
}
\f
/* Return true if REGNO is used by the epilogue. */
final (insns, file, 1);
final_end_function ();
-#if 0
- if (optimize > 0)
- {
- /* Release all memory allocated by df. */
- if (rtl_df)
- {
- df_finish (rtl_df);
- rtl_df = NULL;
- }
-
- /* Release the bitmap obstacks. */
- bitmap_obstack_release (®_obstack);
- bitmap_obstack_release (NULL);
- }
-#endif
-
reload_completed = 0;
epilogue_completed = 0;
}
do
case $check in
# these set all the flags to specific states
- yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
+ yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
ac_fold_checking= ; ac_gc_checking=1 ;
ac_gc_always_collect= ; ac_rtl_checking= ;
ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
do
case $check in
# these set all the flags to specific states
- yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
+ yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
ac_fold_checking= ; ac_gc_checking=1 ;
ac_gc_always_collect= ; ac_rtl_checking= ;
ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
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
of the changeable_flags. */
void
-df_finish_pass (void)
+df_finish_pass (bool verify ATTRIBUTE_UNUSED)
{
int i;
int removed = 0;
df_set_clean_cfg ();
#endif
#endif
+
+#ifdef ENABLE_CHECKING
+ if (verify)
+ df->changeable_flags |= DF_VERIFY_SCHEDULED;
+#endif
}
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]);
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
/* Cause df_insn_rescan df_notes_rescan and df_insn_delete, to
return after marking the insn for later processing. This allows all
rescans to be batched. */
- DF_DEFER_INSN_RESCAN = 32
+ DF_DEFER_INSN_RESCAN = 32,
+
+ DF_VERIFY_SCHEDULED = 64
};
/* Two of these structures are inline in df, one for the uses and one
extern enum df_changeable_flags df_clear_flags (enum df_changeable_flags);
extern void df_set_blocks (bitmap);
extern void df_remove_problem (struct dataflow *);
-extern void df_finish_pass (void);
+extern void df_finish_pass (bool);
extern void df_analyze_problem (struct dataflow *, bitmap, int *, int);
extern void df_analyze (void);
extern int df_get_n_blocks (enum df_flow_dir);
0, /* properties_destroyed */
TODO_verify_flow, /* todo_flags_start */
TODO_dump_func |
+ TODO_df_verify |
TODO_df_finish |
TODO_ggc_collect, /* todo_flags_finish */
'w' /* letter */
{
timevar_push (TV_CSE);
tem2 = cse_main (get_insns (), max_reg_num ());
- df_finish_pass ();
+ df_finish_pass (false);
purge_all_dead_edges ();
delete_trivially_dead_insns (get_insns (), max_reg_num ());
timevar_pop (TV_CSE);
just rescan everything. Not that df_rescan_all_insns is not
going to help here because it does not touch the artificial uses
and defs. */
- df_finish_pass ();
+ df_finish_pass (true);
if (optimize > 1)
df_live_add_problem ();
df_scan_alloc (NULL);
we are doing optimization. */
if (optimize)
df_urec_add_problem ();
+#ifdef ENABLE_CHECKING
+ df->changeable_flags |= DF_VERIFY_SCHEDULED;
+#endif
df_analyze ();
regstat_init_n_sets_and_refs ();
regstat_compute_ri ();
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_df_finish | /* This is shutting down the instance in loop_invariant.c */
+ TODO_df_verify |
+ TODO_df_finish |
TODO_dump_func, /* todo_flags_finish */
'L' /* letter */
};
{
clear_iv_info ();
clean_slate = true;
- df_finish_pass ();
+ df_finish_pass (true);
htab_delete (bivs);
free (iv_ref_table);
iv_ref_table = NULL;
/* Now that the dumping has been done, we can get rid of the optional
df problems. */
if (flags & TODO_df_finish)
- df_finish_pass ();
+ df_finish_pass ((flags & TODO_df_verify) != 0);
}
/* Verify invariants that should hold between passes. This is a place
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
+ TODO_df_verify |
TODO_df_finish |
TODO_dump_func, /* todo_flags_finish */
'u' /* letter */
the instance before it is destroyed. */
#define TODO_df_finish (1 << 16)
+/* Call df_verify at the end of the pass if checking is enabled. */
+#define TODO_df_verify (1 << 17)
+
/* Internally used for the first instance of a pass. */
-#define TODO_mark_first_instance (1 << 17)
+#define TODO_mark_first_instance (1 << 18)
#define TODO_update_ssa_any \
(TODO_update_ssa \