This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFT] fwprop merge


On 5/15/06, Serge Belyshev <belyshev@depni.sinp.msu.ru> wrote:
Steven Bosscher <stevenb.gcc@gmail.com> writes:

> On Sunday 14 May 2006 02:13, Steven Bosscher wrote:
...
> David, Richard, could you give these patches a re-try on SPEC please?

176.gcc fails to compile on an amd64 host with -O3 -funroll-loops. (infinite loop after fwprop)
Here is partially reduced testcase:

First of all, thanks a lot for that test case, and for trying these patches!


The problem you're seeing is caused by the fact that fwprop doesn't
update dominator info when it modifies the CFG.  Therefore it should
free dominance info before doing a cfgcleanup.  The patch below fixes
that problem.

Gr.
Steven


--- fwprop.c.old 2006-05-15 22:20:11.000000000 +0200 +++ fwprop.c 2006-05-15 22:20:07.000000000 +0200 @@ -853,25 +853,25 @@ fwprop_init (void)

static void
fwprop_done (void)
{
  df_finish (df);
-  cleanup_cfg (0);
-  delete_trivially_dead_insns (get_insns (), max_reg_num ());
-
-  if (dump_file)
-    fprintf (dump_file,
-            "\nNumber of successful forward propagations: %d\n\n",
-            num_changes);

  if (flag_rerun_cse_after_loop && (flag_unroll_loops || flag_peel_loops))
    {
      flow_loops_free (&loops);
      free_dominance_info (CDI_DOMINATORS);
      loops.num = 0;
    }

+  cleanup_cfg (0);
+  delete_trivially_dead_insns (get_insns (), max_reg_num ());
+
+  if (dump_file)
+    fprintf (dump_file,
+            "\nNumber of successful forward propagations: %d\n\n",
+            num_changes);
}



/* Main entry point. */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]