]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/25799 (cc1 stalled with -O1 -fmodulo-sched)
authorKenneth Zadeck <zadeck@naturalbridge.com>
Fri, 20 Jan 2006 01:24:00 +0000 (01:24 +0000)
committerKenneth Zadeck <zadeck@gcc.gnu.org>
Fri, 20 Jan 2006 01:24:00 +0000 (01:24 +0000)
2005-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>

PR rtl-optimization/25799
* df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
Corrected confluence operator to remove bits from op2 before oring
with op1 rather than removing bits from op1.
        * (df_ru_transfer_function): Corrected test on wrong bitmap which
caused infinite loop.  Both of these problems were introduced in
the dataflow rewrite.

From-SVN: r110007

gcc/ChangeLog
gcc/df-problems.c

index ff3ba408dc598738c618a03e05ebe5224bd9e30f..84006ab7f9cc007470789b30083985df77e33ac7 100644 (file)
@@ -1,3 +1,13 @@
+2005-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>
+
+       PR rtl-optimization/25799 
+       * df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
+       Corrected confluence operator to remove bits from op2 before oring
+       with op1 rather than removing bits from op1.
+        * (df_ru_transfer_function): Corrected test on wrong bitmap which
+       caused infinite loop.  Both of these problems were introduced in
+       the dataflow rewrite.
+
 2006-01-19  DJ Delorie  <dj@redhat.com>
 
        * reload1.c (find_reload_regs): Note the details of reload
index 2a7ec0d0ed9f9fe8909f5716acc9f7a9caab9f1c..790b3e244a1bafe1e12ad9cec4761224e1e4408f 100644 (file)
@@ -616,13 +616,19 @@ df_ru_confluence_n (struct dataflow *dflow, edge e)
       struct df *df = dflow->df;
       bitmap_iterator bi;
       unsigned int regno;
-      bitmap_ior_and_compl_into (op1, op2, dense_invalidated);
+      bitmap tmp = BITMAP_ALLOC (NULL);
+
+      bitmap_copy (tmp, op2);
+      bitmap_and_compl_into (tmp, dense_invalidated);
+
       EXECUTE_IF_SET_IN_BITMAP (sparse_invalidated, 0, regno, bi)
        {
-         bitmap_clear_range (op1
+         bitmap_clear_range (tmp
                              DF_REG_USE_GET (df, regno)->begin, 
                              DF_REG_USE_GET (df, regno)->n_refs);
        }
+      bitmap_ior_into (op1, tmp);
+      BITMAP_FREE (tmp);
     }
   else
     bitmap_ior_into (op1, op2);
@@ -659,7 +665,7 @@ df_ru_transfer_function (struct dataflow *dflow, int bb_index)
        }
       bitmap_and_compl_into (tmp, kill);
       bitmap_ior_into (tmp, gen);
-      changed = !bitmap_equal_p (tmp, out);
+      changed = !bitmap_equal_p (tmp, in);
       if (changed)
        {
          BITMAP_FREE (out);
@@ -1097,13 +1103,19 @@ df_rd_confluence_n (struct dataflow *dflow, edge e)
       struct df *df = dflow->df;
       bitmap_iterator bi;
       unsigned int regno;
-      bitmap_ior_and_compl_into (op1, op2, dense_invalidated);
+      bitmap tmp = BITMAP_ALLOC (NULL);
+
+      bitmap_copy (tmp, op2);
+      bitmap_and_compl_into (tmp, dense_invalidated);
+
       EXECUTE_IF_SET_IN_BITMAP (sparse_invalidated, 0, regno, bi)
        {
-         bitmap_clear_range (op1
+         bitmap_clear_range (tmp
                              DF_REG_DEF_GET (df, regno)->begin, 
                              DF_REG_DEF_GET (df, regno)->n_refs);
        }
+      bitmap_ior_into (op1, tmp);
+      BITMAP_FREE (tmp);
     }
   else
     bitmap_ior_into (op1, op2);