This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: flow_loops_find
- From: Jan Hubicka <jh at suse dot cz>
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Josef Zlomek <zlomj9am at artax dot karlin dot mff dot cuni dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Jan 2002 15:29:51 +0100
- Subject: Re: PATCH: flow_loops_find
- References: <20011024173657.A5967@artax.karlin.mff.cuni.cz> <20011220174900.A2156@redhat.com> <200201022356.41110@enzo.bigblue.local>
> On Friday 21 December 2001 02:49, Richard Henderson wrote:
> > On Wed, Oct 24, 2001 at 05:36:57PM +0200, Josef Zlomek wrote:
> > > * cfgloop.c (flow_loops_find): Use the information of the depth
> > > first search order of the CFG correctly when finding natural loops.
> >
> > Applied.
>
> This patch breaks glibc on powerpc-linux, it causes ld.so to segfault due to
> a invalid relocation. If you compile the attached testcase with -O2 -fpic
> --param max-inline-insns=10000 (yes, the --param is necessary), you'll see
> that the problem is gcc generating this assembly in .rodata:
>
> .align 2
> .LC17:
> .long env_path_list
>
> This is cause reload generates:
>
> (insn 1727 1240 1257 (set (reg:SI 11 r11)
> (unspec:SI[
> (symbol_ref/u:SI ("*.LC17"))
> (reg:SI 30 r30)
> ] 8)) 287 {*movsi_got_internal} (nil)
> (nil))
>
> (insn 1257 1727 1702 (set (reg/f:SI 28 r28 [424])
> (mem/u/f:SI (reg:SI 11 r11) [6 S4 A32])) 294 {*movsi_internal1} (nil)
> (expr_list:REG_EQUIV (symbol_ref:SI ("@env_path_list"))
> (nil)))
>
> where it should generate a simple:
>
> (insn 1727 1240 1257 (set (reg:SI 11 r11)
> (unspec:SI[
> (symbol_ref/u:SI ("@env_path_list"))
> (reg:SI 30 r30)
> ] 8)) 287 {*movsi_got_internal} (nil)
> (nil))
>
> (insn 1257 1727 1702 (set (reg/f:SI 28 r28 [424])
> (mem/u/f:SI (reg:SI 11 r11) [6 S4 A32])) 294 {*movsi_internal1} (nil)
> (expr_list:REG_EQUIV (symbol_ref:SI ("@env_path_list"))
> (nil)))
>
> Any ideas? I'm at a loss to think of a reason why this patch influences
> reload.
The information is used to compute frequencies that are used to compute register
preferences that influence regalloc decision possibly reulsting in different
bugs - but the bug must have existed before, just this patch uncovers it.
Honza
>
> Franz.