aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2007-08-05 16:04:12 +0000
committerPaolo Bonzini <bonzini@gcc.gnu.org>2007-08-05 16:04:12 +0000
commit0d475361a51725490a60788243a1f785cfba4da1 (patch)
treeb1eb63f779e57b66e9e082792080cffb4ebb30c1 /gcc
parent3d97b1af3fa03940993985f5936b9748b79d2eb8 (diff)
downloadgcc-0d475361a51725490a60788243a1f785cfba4da1.zip
gcc-0d475361a51725490a60788243a1f785cfba4da1.tar.gz
gcc-0d475361a51725490a60788243a1f785cfba4da1.tar.bz2
configure.ac: Remove --enable-checking=df from default settings.
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. From-SVN: r127225
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog27
-rw-r--r--gcc/config/bfin/bfin.c2
-rw-r--r--gcc/config/ia64/ia64.c2
-rw-r--r--gcc/config/sh/sh.c16
-rwxr-xr-xgcc/configure2
-rw-r--r--gcc/configure.ac2
-rw-r--r--gcc/df-core.c18
-rw-r--r--gcc/df.h6
-rw-r--r--gcc/function.c1
-rw-r--r--gcc/gcse.c2
-rw-r--r--gcc/global.c2
-rw-r--r--gcc/local-alloc.c3
-rw-r--r--gcc/loop-init.c3
-rw-r--r--gcc/loop-iv.c2
-rw-r--r--gcc/passes.c2
-rw-r--r--gcc/see.c1
-rw-r--r--gcc/tree-pass.h5
17 files changed, 63 insertions, 33 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3e7dab0..3f0d97a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,30 @@
+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>
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 1ba019c..a946ba6 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -4534,7 +4534,7 @@ bfin_reorg (void)
reorder_var_tracking_notes ();
timevar_pop (TV_VAR_TRACKING);
}
- df_finish_pass ();
+ df_finish_pass (false);
}
/* Handle interrupt_handler, exception_handler and nmi_handler function
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 1b73c3b..cf70493 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -8625,7 +8625,7 @@ ia64_reorg (void)
variable_tracking_main ();
timevar_pop (TV_VAR_TRACKING);
}
- df_finish_pass ();
+ df_finish_pass (false);
}
/* Return true if REGNO is used by the epilogue. */
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index a0ce6de..290d3f0 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -10257,22 +10257,6 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
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 (&reg_obstack);
- bitmap_obstack_release (NULL);
- }
-#endif
-
reload_completed = 0;
epilogue_completed = 0;
}
diff --git a/gcc/configure b/gcc/configure
index 376a3e3..d7de8f0 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -6425,7 +6425,7 @@ for check in release $ac_checking_flags
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 ;
diff --git a/gcc/configure.ac b/gcc/configure.ac
index b50bba5..1eecc61 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -359,7 +359,7 @@ for check in release $ac_checking_flags
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 ;
diff --git a/gcc/df-core.c b/gcc/df-core.c
index 453d61a..3b4e7b3 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
diff --git a/gcc/df.h b/gcc/df.h
index de8afc3..7457277 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -407,7 +407,9 @@ enum df_changeable_flags
/* 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
@@ -807,7 +809,7 @@ extern enum df_changeable_flags df_set_flags (enum df_changeable_flags);
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);
diff --git a/gcc/function.c b/gcc/function.c
index 1856a60..edbef6c 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5514,6 +5514,7 @@ struct tree_opt_pass pass_thread_prologue_and_epilogue =
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 */
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 09a2859..8b82c8e 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -6706,7 +6706,7 @@ rest_of_handle_gcse (void)
{
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);
diff --git a/gcc/global.c b/gcc/global.c
index 57e401a..c346e6a 100644
--- a/gcc/global.c
+++ b/gcc/global.c
@@ -2081,7 +2081,7 @@ rest_of_handle_global_alloc (void)
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);
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index 3a8401b..c42b7149 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -2515,6 +2515,9 @@ rest_of_handle_local_alloc (void)
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 ();
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index af62a31..79d9056 100644
--- a/gcc/loop-init.c
+++ b/gcc/loop-init.c
@@ -251,7 +251,8 @@ struct tree_opt_pass pass_rtl_move_loop_invariants =
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 */
};
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 4f95d8dd..173cd68 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -1266,7 +1266,7 @@ iv_analysis_done (void)
{
clear_iv_info ();
clean_slate = true;
- df_finish_pass ();
+ df_finish_pass (true);
htab_delete (bivs);
free (iv_ref_table);
iv_ref_table = NULL;
diff --git a/gcc/passes.c b/gcc/passes.c
index 5151706..8258ca2 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1013,7 +1013,7 @@ execute_todo (unsigned int flags)
/* 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
diff --git a/gcc/see.c b/gcc/see.c
index 7d500598..0aba8df 100644
--- a/gcc/see.c
+++ b/gcc/see.c
@@ -3831,6 +3831,7 @@ struct tree_opt_pass pass_see =
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
+ TODO_df_verify |
TODO_df_finish |
TODO_dump_func, /* todo_flags_finish */
'u' /* letter */
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index e210798..fc12a6c 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -222,8 +222,11 @@ struct dump_file_info
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 \