[Bug tree-optimization/46183] [4.6 Regression] ICE: in calc_dfs_tree, at dominance.c:396 with -O -fno-dse -fgcse -ftree-pre

steven at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 2 15:03:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46183

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
         AssignedTo|steven at gcc dot gnu.org   |unassigned at gcc dot
                   |                            |gnu.org

--- Comment #6 from Steven Bosscher <steven at gcc dot gnu.org> 2010-11-02 15:02:39 UTC ---
Fix would look something like this. No time to finish this, though.

Index: gcse.c
===================================================================
--- gcse.c      (revision 166183)
+++ gcse.c      (working copy)
@@ -5246,11 +5246,13 @@ gate_rtl_cprop (void)
 static unsigned int
 execute_rtl_cprop (void)
 {
+  int changed;
   delete_unreachable_blocks ();
   df_set_flags (DF_LR_RUN_DCE);
   df_analyze ();
-  flag_rerun_cse_after_global_opts |= one_cprop_pass ();
-  return 0;
+  changed = one_cprop_pass ();
+  flag_rerun_cse_after_global_opts |= changed;
+  return changed ? TODO_cleanup_cfg : 0;
 }

 static bool
@@ -5265,10 +5267,12 @@ gate_rtl_pre (void)
 static unsigned int
 execute_rtl_pre (void)
 {
+  int changed;
   delete_unreachable_blocks ();
   df_analyze ();
-  flag_rerun_cse_after_global_opts |= one_pre_gcse_pass ();
-  return 0;
+  changed = one_pre_gcse_pass ();
+  flag_rerun_cse_after_global_opts |= changed;
+  return changed ? TODO_cleanup_cfg : 0;
 }

 static bool
@@ -5286,10 +5290,12 @@ gate_rtl_hoist (void)
 static unsigned int
 execute_rtl_hoist (void)
 {
+  int changed;
   delete_unreachable_blocks ();
   df_analyze ();
-  flag_rerun_cse_after_global_opts |= one_code_hoisting_pass ();
-  return 0;
+  changed = one_code_hoisting_pass ();
+  flag_rerun_cse_after_global_opts |= changed;
+  return changed ? TODO_cleanup_cfg : 0;
 }

 struct rtl_opt_pass pass_rtl_cprop =



More information about the Gcc-bugs mailing list