This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: flow_loops_find


> 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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]