This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mainline regression (was Re: [PATCH] Prevent ifcvt from moving computations into loop)
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: gdr at integrable-solutions dot net (Gabriel Dos Reis)
- Cc: davem at redhat dot com (David S. Miller), rakdver at atrey dot karlin dot mff dot cuni dot cz, rth at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 24 Jul 2003 18:41:11 +0100 (BST)
- Subject: Re: mainline regression (was Re: [PATCH] Prevent ifcvt from moving computations into loop)
>
> "David S. Miller" <davem@redhat.com> writes:
>
> | With the addition of this change:
> |
> | * Makefile.in (ifcvt.o): Add cfgloop.h.
> | * basic-block.h (EDGE_LOOP_EXIT): New flag.
> | * cfgrtl.c (rtl_verify_flow_info_1): Handle it correctly.
> | * ifcvt.c: Include cfgloop.h.
> | (mark_loop_exit_edges): New static function.
> | (if_convert): Call it.
> | (find_if_header): Ignore branches out of loops.
> |
> | mainline now gets into infinite loops for a significant portion
> | of the testsuite on sparc64-linux-gnu, but I have a feeling that
> | this problem is going to be seen on other targets too.
>
> Yes, the regression checker reported failures elsewhere.
sh64-elf doesn't build at all with this patch - it fails building
gcov.o for sh5-32media. The issue is that cfgrtl.c and cfgloop.c
can't deal with branches that use branch target registers, which
is the case after reload for shmedia.
I'm currently testing the appended patch to see how far it goes. At any
rate, it allows make all-gcc to succeed.
2003-07-24 J"orn Rennecke <joern.rennecke@superh.com>
* ifcvt.c (if_convert): Don't call mark_loop_exit_edges after reload.
Index: ifcvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ifcvt.c,v
retrieving revision 1.123
diff -p -r1.123 ifcvt.c
*** ifcvt.c 18 Jul 2003 22:52:05 -0000 1.123
--- ifcvt.c 24 Jul 2003 17:39:03 -0000
*************** if_convert (int x_life_data_ok)
*** 3112,3118 ****
num_removed_blocks = 0;
life_data_ok = (x_life_data_ok != 0);
! mark_loop_exit_edges ();
/* Free up basic_block_for_insn so that we don't have to keep it
up to date, either here or in merge_blocks. */
--- 3112,3120 ----
num_removed_blocks = 0;
life_data_ok = (x_life_data_ok != 0);
! /* flow_loops_find doesn't work when branches use branch target registers. */
! if (! reload_completed)
! mark_loop_exit_edges ();
/* Free up basic_block_for_insn so that we don't have to keep it
up to date, either here or in merge_blocks. */