re PR rtl-optimization/27616 (Infinite loop at -O1 and above in RTL CSE)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Mon, 4 Sep 2006 19:33:24 +0000 (21:33 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 4 Sep 2006 19:33:24 +0000 (19:33 +0000)
commit5bb51e1d55ed5448130dd532ffa01c15bc77e113
treece136ce4de60baf3887aab1aea174d9a6a8969d1
parentafe08db5e6eca5919176811710d7fc74f354b7e6
re PR rtl-optimization/27616 (Infinite loop at -O1 and above in RTL CSE)

PR rtl-optimization/27616
* cse.c (table_size): New static variable.
(new_basic_block): Initialize it to 0.
(remove_from_table): Decrement it.
(insert): Increment it.
(fold_rtx_mem_1): New function, renamed from fold_rtx_mem.
(fold_rtx_mem): Enforce a cap on the recursion depth.  Call
fold_rtx_mem_1 if under the cap.
(fold_rtx) <RTX_COMM_ARITH>: In the associative case, delay a little
the lookup of the equivalent expression and test for equality of the
first operand of the equivalent expression before in turn looking up
an equivalent constant for the second operand.

From-SVN: r116683
gcc/ChangeLog
gcc/cse.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20060904-1.c [new file with mode: 0644]