diff options
author | zadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-20 01:24:00 +0000 |
---|---|---|
committer | zadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-20 01:24:00 +0000 |
commit | 716e25d42424eacc1f85221ab54424b249fc8d52 (patch) | |
tree | 6d043ee3620aafaa2ec6868a786523870ee51acd /gcc | |
parent | 36326827c7c62d4b89451e8b04431695b4dbbc9b (diff) | |
download | gcc-716e25d42424eacc1f85221ab54424b249fc8d52.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110007 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/df-problems.c | 22 |
2 files changed, 27 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff3ba408dc5..84006ab7f9c 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 2a7ec0d0ed9..790b3e244a1 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); |