This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ifcvt fix
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: Richard Henderson <rth at redhat dot com>,Jan Hubicka <jh at suse dot cz>,gcc-patches at gcc dot gnu dot org
- Date: Fri, 05 Apr 2002 15:35:18 +0200
- Subject: Re: ifcvt fix
- References: <200203292344.17185@enzo.bigblue.local><20020328182152.GI3987@atrey.karlin.mff.cuni.cz><20020328110716.H18325@redhat.com><200203292344.17185@enzo.bigblue.local>
At 14:05 30.03.2002, Jan Hubicka wrote:
> > On Thursday 28 March 2002 20:07, Richard Henderson wrote:
> > > On Thu, Mar 28, 2002 at 07:21:52PM +0100, Jan Hubicka wrote:
> > > > * ifcvt.c (if_convert): Clear aux_for_blocks early enought.
> > >
> > > Ok everywhere.
> >
> > Jan, please don't apply it on the 3_1-branch without further testing, I
> get a
> > _lot_ of testsuite regressions (it doesn't even bootstrap) on
> > powerpc-linux-gnu with it, for example gcc.c-torture/compile/900116-1.c:
> >
> > (gdb) r -fpreprocessed 900116-1.i -quiet -dumpbase 900116-1.c -O1
> -version -o
> > 900116-1.s
> > Starting program: /cvsx/rawhide/BUILD/obj-gcc31-ppc/gcc/./cc1
> -fpreprocessed
> > 900116-1.i -quiet -dumpbase 900116-1.c -O1 -version -o 900116-1.s
> > Breakpoint 2 at 0xfeec090
> > Breakpoint 3 at 0xfeead08
> > GNU CPP version 3.1 20020329 (prerelease) (cpplib) (PowerPC GNU/Linux)
> > GNU C version 3.1 20020329 (prerelease) (ppc-linux)
> > compiled by GNU C version 3.1 20020329 (prerelease).
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > calculate_global_regs_live (blocks_in=0x41, blocks_out=0x10429b80,
> flags=16)
> > at /cvsx/rawhide/BUILD/gcc-3.1/gcc/flow.c:1118
> > 1118 bb->aux = NULL;
> > (gdb) l
> > 1113 edge e;
> > 1114
> > 1115 bb = *qhead++;
> > 1116 if (qhead == qend)
> > 1117 qhead = queue;
> > 1118 bb->aux = NULL;
> > 1119
> > 1120 /* Begin by propagating live_at_start from the successor
> > blocks. */
> > 1121 CLEAR_REG_SET (new_live_at_end);
> > 1122
> > (gdb) bt
>
>Uhm, perhaps it is because the 3.1 version of patch needs to be somewhat
>different.
>I am just going to test:
>
>Index: ifcvt.c
>===================================================================
>RCS file: /cvs/gcc/gcc/gcc/ifcvt.c,v
>retrieving revision 1.78.2.1
>diff -c -3 -p -r1.78.2.1 ifcvt.c
>*** ifcvt.c 2002/03/18 00:18:41 1.78.2.1
>--- ifcvt.c 2002/03/30 12:04:48
>*************** if_convert (x_life_data_ok)
>*** 2756,2761 ****
>--- 2756,2762 ----
> if (UPDATE_LIFE (BASIC_BLOCK (block_num)))
> SET_BIT (update_life_blocks, block_num);
>
>+ clear_aux_for_blocks ();
> count_or_remove_death_notes (update_life_blocks, 1);
> /* ??? See about adding a mode that verifies that the initial
> set of blocks don't let registers come live. */
>*************** if_convert (x_life_data_ok)
>*** 2765,2771 ****
>
> sbitmap_free (update_life_blocks);
> }
>! clear_aux_for_blocks ();
>
> /* Write the final stats. */
> if (rtl_dump_file && num_possible_if_blocks > 0)
>--- 2766,2773 ----
>
> sbitmap_free (update_life_blocks);
> }
>! else
>! clear_aux_for_blocks ();
>
> /* Write the final stats. */
> if (rtl_dump_file && num_possible_if_blocks > 0)
Oops, forgot to report the status.
This patch bootstrapped and regtested just fine on powerpc-linux-gnu.
Franz.