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: bootstrap broken on powerpc-linux and powerpc64-linux


On Wed, Dec 14, 2005 at 03:47:13PM +0000, Joern RENNECKE wrote:
> The match is not attempted with my cross compiler because insn 296 is in 
> the way:
[snip]

Why is is "in the way"?  BTW, the "use" is just the way the rs6000
backend ties together a toc load with whatever is stored in the toc.  So
when we load an address from the toc, the item addressed won't be
deleted as unused.

> Since your insn numbers are otherwise the same, I suspect that insn 296 
> was also emitted in your compiler, but later deleted or moved.  
> Apparently, the code
> that does not work correctly either or your or my system.  Could you 
> find out when and where insn 296 is moved / deleted on your system?

Insn 296 is moved in sched1.  I'd have thought that insn 296 and insn
297 ought to stay together, because the "use" belongs with the load of
reg 264.  In which case whatever is deleting insn 297 in oldloop
probably ought to also remove insn 296.

296 is before 299 the first time I hit note_local_live.

Breakpoint 6, note_local_live (info=0xffffdc40, x=0x4024b7b0, y=0x4024b498, 
    rvalue=1) at /src/gcc-current/gcc/struct-equiv.c:321
(gdb) up
#1  0x10606260 in rtx_equiv_p (xp=0x4024ce4c, y=0x4024b498, rvalue=1, 
    info=0xffffdc40) at /src/gcc-current/gcc/struct-equiv.c:541
(gdb) 
#2  0x106062e0 in rtx_equiv_p (xp=0x40237dfc, y=0x4024c820, rvalue=-1, 
    info=0xffffdc40) at /src/gcc-current/gcc/struct-equiv.c:554
(gdb) 
#3  0x106075f0 in insns_match_p (i1=0x40237de0, i2=0x40246f60, 
    info=0xffffdc40) at /src/gcc-current/gcc/struct-equiv.c:932
(gdb) 
#4  0x1060811c in struct_equiv_block_eq (mode=531, info=0xffffdc40)
    at /src/gcc-current/gcc/struct-equiv.c:1168
(gdb) p debug_rtx_list (yi, -5)
(insn 296 300 299 29 /src/gcc-current/libgfortran/generated/product_c8.c:133 (use (symbol_ref/f:SI ("*.LC2") [flags 0x2] <complex_cst 0x4024b390>)) -1 (nil)
    (nil))

(insn:HI 299 296 301 29 /src/gcc-current/libgfortran/generated/product_c8.c:133 (set (mem:DF (reg/v/f:SI 28 28 [orig:163 dest ] [163]) [17 S8 A64])
        (reg:DF 32 0 [265])) 328 {*movdf_hardfloat32} (insn_list:REG_DEP_TRUE 298 (nil))
    (expr_list:REG_DEAD (reg:DF 32 0 [265])
        (nil)))

(insn:HI 301 299 603 29 /src/gcc-current/libgfortran/generated/product_c8.c:133 (set (mem:DF (plus:SI (reg/v/f:SI 28 28 [orig:163 dest ] [163])
                (const_int 8 [0x8])) [17 S8 A64])
        (reg:DF 45 13 [266])) 328 {*movdf_hardfloat32} (insn_list:REG_DEP_TRUE 300 (nil))
    (expr_list:REG_DEAD (reg:DF 45 13 [266])
        (nil)))

(jump_insn:HI 603 301 604 29 (set (pc)
        (label_ref 342)) 545 {jump} (insn_list:REG_DEP_ANTI 296 (insn_list:REG_DEP_TRUE 298 (insn_list:REG_DEP_TRUE 300 (insn_list:REG_DEP_ANTI 299 (insn_list:REG_DEP_ANTI 301 (nil))))))
    (nil))

(barrier:HI 604 603 304)

called from

(gdb) p *pass
$7 = {name = 0x10a40354 "csa", 
  gate = 0x1085bb9c <gate_handle_stack_adjustments>, 
  execute = 0x1085bbd4 <rest_of_handle_stack_adjustments>, sub = 0x0, 
  next = 0x10a5bd88, static_pass_number = 145, tv_id = 0, 
  properties_required = 264, properties_provided = 264, 
  properties_destroyed = 0, todo_flags_start = 0, todo_flags_finish = 3, 
  letter = 0 '\0'}


======== .00.expand
(insn 296 295 297 29 (use (symbol_ref/f:SI ("*.LC2") [flags 0x2] <complex_cst 0x4025a708>)) -1 (nil)
    (nil))

(insn 297 296 298 29 (set (reg/f:SI 264)
        (mem/u/c:SI (plus:SI (reg:SI 30 30)
                (const:SI (minus:SI (symbol_ref/u:SI ("*.LC3") [flags 0x2])
                        (symbol_ref:SI ("*.LCTOC1"))))) [16 S4 A8])) -1 (nil)
    (expr_list:REG_EQUAL (symbol_ref/f:SI ("*.LC2") [flags 0x2] <complex_cst 0x4025a708>)
        (nil)))

(insn 298 297 299 29 (set (reg:DF 265)
        (mem/i:DF (reg/f:SI 264) [1 S8 A64])) -1 (nil)
    (nil))

(insn 299 298 300 29 (set (mem:DF (reg/v/f:SI 163 [ dest ]) [17 S8 A64])
        (reg:DF 265)) -1 (nil)
    (nil))

======== .11.oldloop has deleted 297 because reg 264 is already set
(insn 296 294 298 31 /src/gcc-current/libgfortran/generated/product_c8.c:133 (use (symbol_ref/f:SI ("*.LC2") [flags 0x2] <complex_cst 0x4025a708>)) -1 (nil)
    (nil))

(insn 298 296 299 31 /src/gcc-current/libgfortran/generated/product_c8.c:133 (set (reg:DF 265)
        (mem/i:DF (reg/f:SI 264) [1 S8 A64])) -1 (nil)
    (nil))

(insn 299 298 300 31 /src/gcc-current/libgfortran/generated/product_c8.c:133 (set (mem:DF (reg/v/f:SI 163 [ dest ]) [17 S8 A64])
        (reg:DF 265)) -1 (nil)
    (nil))

======== .33.life2 has
(insn:HI 296 294 298 29 /src/gcc-current/libgfortran/generated/product_c8.c:133 (use (symbol_ref/f:SI ("*.LC2") [flags 0x2] <complex_cst 0x4025a708>)) -1 (nil)
    (nil))

(insn:HI 298 296 299 29 /src/gcc-current/libgfortran/generated/product_c8.c:133 (set (reg:DF 265)
        (mem/i:DF (reg/f:SI 264) [1 S8 A64])) 328 {*movdf_hardfloat32} (nil)
    (expr_list:REG_EQUAL (mem/i:DF (symbol_ref/f:SI ("*.LC2") [flags 0x2] <complex_cst 0x4025a708>) [1 S8 A64])
        (nil)))

(insn:HI 299 298 300 29 /src/gcc-current/libgfortran/generated/product_c8.c:133 (set (mem:DF (reg/v/f:SI 163 [ dest ]) [17 S8 A64])
        (reg:DF 265)) 328 {*movdf_hardfloat32} (insn_list:REG_DEP_TRUE 298 (nil))
    (expr_list:REG_DEAD (reg:DF 265)
        (nil)))

======== .35.sched1 moves things around
(insn:HI 298 294 300 29 /src/gcc-current/libgfortran/generated/product_c8.c:133 (set (reg:DF 265)
        (mem/i:DF (reg/f:SI 264) [1 S8 A64])) 328 {*movdf_hardfloat32} (nil)
    (expr_list:REG_EQUAL (mem/i:DF (symbol_ref/f:SI ("*.LC2") [flags 0x2] <complex_cst 0x4025a708>) [1 S8 A64])
        (nil)))

(insn:HI 300 298 296 29 /src/gcc-current/libgfortran/generated/product_c8.c:133 (set (reg:DF 266)
        (mem/i:DF (plus:SI (reg/f:SI 264)
                (const_int 8 [0x8])) [1 S8 A64])) 328 {*movdf_hardfloat32} (nil)
    (expr_list:REG_EQUAL (mem/i:DF (const:SI (plus:SI (symbol_ref/f:SI ("*.LC2") [flags 0x2] <complex_cst 0x4025a708>)
                    (const_int 8 [0x8]))) [1 S8 A64])
        (nil)))

(insn:HI 296 300 299 29 /src/gcc-current/libgfortran/generated/product_c8.c:133 (use (symbol_ref/f:SI ("*.LC2") [flags 0x2] <complex_cst 0x4025a708>)) -1 (nil)
    (nil))

Hmm, I see sched disassociates the "use" from the insn that references
LC2 via the toc anyway, even where the insn that loads from the toc is
not deleted like insn 297.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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