configure.ac: Remove --enable-checking=df from default settings.
authorPaolo Bonzini <bonzini@gnu.org>
Sun, 5 Aug 2007 16:04:12 +0000 (16:04 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Sun, 5 Aug 2007 16:04:12 +0000 (16:04 +0000)
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

17 files changed:
gcc/ChangeLog
gcc/config/bfin/bfin.c
gcc/config/ia64/ia64.c
gcc/config/sh/sh.c
gcc/configure
gcc/configure.ac
gcc/df-core.c
gcc/df.h
gcc/function.c
gcc/gcse.c
gcc/global.c
gcc/local-alloc.c
gcc/loop-init.c
gcc/loop-iv.c
gcc/passes.c
gcc/see.c
gcc/tree-pass.h

index 3e7dab0c34618d000436697784ad7cf26fac20b8..3f0d97ae273db880ce44f3d5846f1ac920e6a005 100644 (file)
@@ -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>
 
index 1ba019cd243da0b6f284c421c3161ee0c9b1dc8b..a946ba66d481396045da4f1bfa71557f225f1506 100644 (file)
@@ -4534,7 +4534,7 @@ bfin_reorg (void)
       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
index 1b73c3b5aeeef0092277ac090cdd44d4812ab46a..cf704935795b6d93bacd6552e3ba3524e0448120 100644 (file)
@@ -8625,7 +8625,7 @@ ia64_reorg (void)
       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.  */
index a0ce6de3310f22905149a993457e373fee665e8c..290d3f05d3b4cfc35910471195ee3c5470f4baca 100644 (file)
@@ -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;
 }
index 376a3e394c453c9c3ac4ff43c3d877f307d9d327..d7de8f0a96c243174e5a88a55b9f316436870758 100755 (executable)
@@ -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 ;
index b50bba56fb1177fac2dd496636fa3cc2dfc0dea8..1eecc61b486b25f2a808994868f30cdcd16ff71c 100644 (file)
@@ -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 ;
index 453d61a999fe814c26b65031a9ced5ac1a315bc7..3b4e7b3e579e440f7c7cfdff5a7951dfa9bd3a84 100644 (file)
@@ -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
index de8afc334842d4b06c90f79ac5458fdbf30f3516..7457277915d0c4c9288e536dd21ed432ec512d13 100644 (file)
--- 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);
index 1856a6095e157be767863dae29158279d7472608..edbef6c15a9bea2dc011a237b1ecfc20e0bf452b 100644 (file)
@@ -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 */
index 09a2859978996a7554374aac85d9939c1d2e3a8a..8b82c8e57997c50ce5e415a11afc7cff1aae33c1 100644 (file)
@@ -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);
index 57e401ac99082841e1cde44708ed5ce426d48a65..c346e6ad5f2bab4b7d4f2fffdc06fb3b1934a548 100644 (file)
@@ -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);
index 3a8401b91511f85ce5bb43f39faee62c594728bf..c42b7149145dbb9a79c11fe3047f4c83329fef80 100644 (file)
@@ -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 ();
index af62a31a9b8bc96b11a9f4b94a50a9f58a8aebf6..79d9056f2b3662e6f8e6da92052e50b5ee7b6bfb 100644 (file)
@@ -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 */
 };
index 4f95d8ddf4c526edae001a40d3297ad99ceae27e..173cd68bbba29a80996c432e89a3c1cb53d02636 100644 (file)
@@ -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;
index 51517063d8fb7750a84f663fc687ec8c78d8d7d0..8258ca2344859e9948597b0ef78674034e30245e 100644 (file)
@@ -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
index 7d50059887b5719a0d2d8d5ce8a99c914c1cc482..0aba8df71328704986898ea360afef60fb1cd8c5 100644 (file)
--- 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 */
index e210798e63e4aa9e98279345d634e2dbc1de9f9c..fc12a6c738eb44bd7f108c681bf30ff7785a83f7 100644 (file)
@@ -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                   \