aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/df-problems.c22
2 files changed, 27 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ff3ba40..84006ab 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index 2a7ec0d..790b3e2 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -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);